Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SilverStripe SMTP authentication instead of PHP mail() function

My hosting provider (webhosting.uk.com) for security reason has disabled the PHP mail() function requiring to update our code using a SMTP authentication. I have no idea how to change the code, I suppose it's in the sapphire folder? At the moment the contact form on my website doesn't send the email to the recipient and the newsletter module fails to send... Can anyone help me in this, or point me in the right direction?

Thanks in advance

like image 897
Mauro74 Avatar asked Feb 16 '26 08:02

Mauro74


1 Answers

Don't change the code in core - it will make updates complicated and isn't necessary.

There's a dedicated module for this problem: https://github.com/xeraa/silverstripe-smtp Disclaimer: I'm the author, but it's free + BSD licensed so there's no reason for not using it.

like image 106
xeraa Avatar answered Feb 17 '26 22:02

xeraa