Jump to content

Recommended Posts

Posted

I have moved the website of my va, to a newer hosting company.

Except for several errors, which have been corrected, or are only a small nuisance, I have one that is bugging me.

75% of the mails send to pilots do not arrive, because the mails receive a 550 message, meaning that the email address does not exist. Further investigation tells you that the mail has been rejected because the mailserver was on a blacklist.

I emailed my hosting company and they said:"If you use the standard smtp on port 25, you have the risk that it is blacklisted".

You should use the fixed address and ports.

It was not difficult to find, where to change it, but I could not find where/how to add that the mailservers needs authentication through SSL or TLS.

Can somebody maybe point me to where these protocols?

  • Members
Posted

The only email settings that i am aware of are those

Config::Set('EMAIL_FROM_NAME', '');
Config::Set('EMAIL_FROM_ADDRESS', ''); Config::Set('EMAIL_USE_SMTP', false);
# Add multiple SMTP servers by separating them with ;
Config::Set('EMAIL_SMTP_SERVERS', '');
Config::Set('EMAIL_SMTP_PORT', '25');
Config::Set('EMAIL_SMTP_USE_AUTH', false);
Config::Set('EMAIL_SMTP_USER', '');
Config::Set('EMAIL_SMTP_PASS', '');

I do not know if that is any help for you

Posted

My hosting company has been looking into it as well.

And they thought they had the solution. But it still does not work.

They thought that the standard phpmailer was used and that something for the TLS could be used, on default.

So they filled the local.config.php for me:

# Email Settings

Config::Set('EMAIL_FROM_NAME', 'City Link Virtual Airlines');

Config::Set('EMAIL_FROM_ADDRESS', 'my@email.com');

Config::Set('EMAIL_USE_SMTP', true);

# Add multiple SMTP servers by separating them with ;

Config::Set('EMAIL_SMTP_SERVERS', 'smtp.server.com');

Config::Set('EMAIL_SMTP_PORT', '587');

Config::Set('EMAIL_SMTP_USE_AUTH', true);

Config::Set('EMAIL_SMTP_USER', 'my@email.com');

Config::Set('EMAIL_SMTP_PASS', 'secret');

Config::Set('EMAIL_SMTP_SECURE', 'tls'); # Setup TLS in PHPMailer

Then added this in the util.class.php row 253

$mail->SMTPSecure = Config::Get('EMAIL_SMTP_SECURE');

I tried that out, but it did not work either.

So I guess, I need to add something too.

I am open to any suggestion.

  • 4 weeks later...
Posted

In order to send authenticated SMTP email over TLS, you need the following in your local.config.php (bug fix!):

Config::Set('EMAIL_USE_SMTP', true);
// Add multiple SMTP servers by separating them with ;
Config::Set('EMAIL_SMTP_SERVERS', 'smtp.example.com');
Config::Set('EMAIL_SMTP_PORT', '25'); // or 587
Config::Set('EMAIL_SMTP_USE_AUTH', true);
Config::Set('EMAIL_SMTP_USER', 'yourname@example.com');
Config::Set('EMAIL_SMTP_PASS', 'p4ssword');
Config::Set('EMAIL_SMTP_SECURE', 'tls');

Then, open up /core/classes/Util.class.php, scroll to line 257 and add in that code block:

if(Config::Get('EMAIL_SMTP_USE_AUTH') == true)
{
$mail->SMTPAuth = Config::Get('EMAIL_SMTP_USE_AUTH'); // <- this line needs to be added
$mail->Username = Config::Get('EMAIL_SMTP_USER');
$mail->Password = Config::Get('EMAIL_SMTP_PASS');
$mail->SMTPSecure = Config::Get('EMAIL_SMTP_SECURE');
}

Otherwise PHPMailer won't trya authenticating because $mail->SMTPAuth value isn't set.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...