- Code: Select all
$mailer->SMTPDebug = true;
$mailer->Send();
echo $mailer->ErrorInfo;
exit;
after $mailer->IsHTML(false);
in the /protected/modules/notifier/components/Notifier.php file.
b.If you get the error 503, saying that the message is not sent, follow the instruction below:
The possible causes of your problem and their solutions:
1) the emails are not sent because of incorrect smtp settings in the admin area of your site if you use smtp for sending emails. So, please, correct the settings:
Settings - > section Email - > edit the lines correctly;
2) the emails are not sent because one or more actions are disabled in the admin area of your site;
Settings - > section Notifier - > activate the necessary lines:
a) Should the system send a letter to the user after he/she has filled the registration form?
b) Should the system send a letter to the administrator when new user has been registered?
3) the emails are not sent if your hosting provider has some unusual settings for sending emails. And so please contact your hosting provider.
c.And you can also set the sending of emails here:
Open protected\modules\notifier\components\Notifier.php file
And add the smtp settings which you have got from your hosting provider into the code itself (so the CMS will use the smtp settings from the code, not from the dashboard)
For example:
- Code: Select all
$mailer->Host = 'Address of SMTP server';
$mailer->Port = 'Port of SMTP server';
$mailer->Username = 'SMTP user login';
$mailer->Password = 'SMTP user password';
If the data which you have got from your hosting provider do not work again, you can use the smtp data of Microsoft.which always work.
So you should paste the following code:
- Code: Select all
$mailer->SMTPSecure = 'tls';
$mailer->Host = "smtp.live.com";
$mailer->Port = 587;
$mailer->Username = "outlook.com login";
$mailer->Password = "outlook.com password";
instead of the existing lines.:
- Code: Select all
$mailer->Host = param('mailSMTPHost', 'localhost');
$mailer->Port = param('mailSMTPPort', 25);
$mailer->Username = param('mailSMTPLogin'); // SMTP login
$mailer->Password = param('mailSMTPPass'); // SMTP password