Categories
SilverStripe SMTP settings
The default PHP mail() function that SilverStripe hosting uses is not supported by MijnHostingPartner.nl, because we require SMTP authentication when sending email.To solve this issue and allow mail to be sent via SilverStripe, the following steps can be applied.
Step 1 SilverStripe SMTP
Download the following zip file and save it locally.Step 2 SilverStripe SMTP
Upload the file to the wwwroot folder in the SilverStripe installation, unzip it through the file manager, and rename thesilverstripe-smtp-masterfolder to smtp<
Step 3 SilverStripe SMTP
After uploading and renaming the folder silverstripe-smtp-master, go to the filemysite/_config.phpHere you will complete the existing code with the following lines:
//Required:
define('SMTPMAILER_SMTP_SERVER_ADDRESS', 'smtp.myhostingpartner.co.uk'); //SMTP server addressdefine
('SMTPMAILER_DO_AUTHENTICATE', true); //Turn on SMTP server authentication.Set to false for an anonymous connectiondefine
('SMTPMAILER_USERNAME',
'email@adres.nl'); //SMTP server username, if SMTPAUTH == truedefine
('SMTPMAILER_PASSWORD', 'password
//Optional:
define('SMTPMAILER_CHARSET_ENCODING', 'utf-8'); //Email characters encoding, e.g.: 'utf-8' or 'iso-8859-1'
define('SMTPMAILER_USE_SECURE_CONNECTION', 'tls'); //SMTP encryption method : Set to '', 'tls', or 'ssl'
define('SMTPMAILER_SMTP_SERVER_PORT', 25); //SMTP server port.Set to 25 if no encryption is used, 465 if ssl or tls is activateddefine
('SMTPMAILER_DEBUG_MESSAGING_LEVEL', 0); //Print debugging informations.0 = no debugging, 1 = print errors, 2 = print errors and messages, 4 = print full activitydefine
('SMTPMAILER_LANGUAGE_OF_MESSAGES', 'de'); //Language for messages.Look into smtp/code/vendor/language/ for available languagesdefine
('SMTPMAILER_SEND_DELAY', 2000);//throttling, in milliseconds, can also be
0
After this the mail should work within SilverStripe, if you want more information we refer you to the github page of this module: https://github.com/xeraa/silverstripe-smtp