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.

All other Modules /

Discuss all other Modules here.

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

Use a email relay for the newsletter module


Go to End


5 Posts   1175 Views

Avatar
BigD1214

Community Member, 24 Posts

30 October 2013 at 11:33am

Hello,
Im trying to use a third party email relay to send my emails with the newsletter module. I have the function all set and ready but when I try to swap out the mail() function in my Email.php file it seems to be sending the same way it has always used. Does the newsletter module not use the Email class? If not what does it use and where can i find it? Im still pretty new with SilverStripe.

Thanks

Avatar
Willr

Forum Moderator, 5523 Posts

30 October 2013 at 6:51pm

I'm pretty sure newsletter does use the email class (https://github.com/silverstripe-labs/silverstripe-newsletter/blob/master/code/email/NewsletterEmail.php) perhaps multiple mail() calls you may have missed. Editing the core mail class is probably not wise as it'll make upgrading hard. You can provide your own Mailer to handle sending email through something other than mail(). See PostmarkMailer as an example that goes over postmark (https://github.com/fullscreeninteractive/silverstripe-postmarkmailer)

Avatar
swaiba

Forum Moderator, 1899 Posts

30 October 2013 at 11:45pm

Hi,

I use https://github.com/xeraa/silverstripe-smtp along with sendgrid.com - if that is where your question was directed.

Avatar
BigD1214

Community Member, 24 Posts

31 October 2013 at 4:17am

Ok that is a good point. Thanks for the heads up. How difficult are these options? I like them but not sure on where to start.

Avatar
BigD1214

Community Member, 24 Posts

31 October 2013 at 5:38am

Thanks Guys I got it working, Worked like a charm. Thanks!