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.

Archive /

Our old forums are still available as a read-only archive.

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

emailing forms to different addresses


Go to End


3 Posts   2032 Views

Avatar
Arm

Community Member, 12 Posts

6 August 2008 at 10:31pm

Edited: 06/08/2008 10:31pm

Hey Guys,

Am a little stuck on how to email forms to different email addresses depending on what the user has selected on the form. At the moment I have tried:

$email->to = 'myaddress@whatever.com';

but it always seem to send it to the default admin account.

Any clues?

Avatar
Willr

Forum Moderator, 5523 Posts

7 August 2008 at 5:22pm

You havent set Email::send_all_emails_to() to anywhere have you?. Also if the site is in 'dev' or 'test' mode I believe it will instantly email all emails to the admin address to prevent spamming 40,000 members

Avatar
Arm

Community Member, 12 Posts

12 August 2008 at 2:51am

Ah yes I may have changed a few settings around. I couldn't remember where I made the change so I just replaced my entire saphire folder out of laziness and it did the trick. Thanks for the help!