Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Themes

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

How to read data in the config file


Reply

2 Posts   1442 Views

Avatar
sugith_k

11 May 2010 at 8:59pm Community Member, 1 Post

Hi,
I created a article comment using the help which was given in ssbits.com. In that article, it was asked to add the admin email as a static value to the code. I would like to know, how to add the admin email to the config file and how to get that admin email and assign it to the admin email parameter which use in the email function in the comment file.

Can someone help me with this?

Thank you,
Sugith Karunaratne
Web Developer
IBCS Corp

Avatar
Willr

11 May 2010 at 10:30pm Forum Moderator, 5511 Posts

I would like to know, how to add the admin email to the config file

You should set the admin email with Email::setAdminEmail('email@email.com'). You can then get the admin email using the corresponding function Email::getAdminEmail();