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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Themes /

Discuss SilverStripe Themes.

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

How to read data in the config file


Go to End


2 Posts   2270 Views

Avatar
sugith_k

Community Member, 1 Post

11 May 2010 at 8:59pm

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

Forum Moderator, 5523 Posts

11 May 2010 at 10:30pm

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();