1

I am having an issue with my provider/hoster and I am looking for some advise.

We send Freeform forms with SMTP with this config. Looks like many others do the same.

$config['mail_protocol']    = 'smtp';
 $config['smtp_server']      = 'tls://smtp.gmail.com:465';   
 $config['smtp_username']    = 'mail@xxx.xx';
 $config['smtp_password']    = 'xxxxx';
 $config['email_newline']    = "\r\n";
 $config['email_crlf']       = "\n";

The sending goes on port 465 but Google recommends port 587. And port 587 is what our hoster wants us to send on. But EE can not.

Our hoster opened port 465 for us. When they do server updates the port gets closed again and we don't get any forms untill we realize and ask to get the port open again.

If we use port 587 we get this

Message: fsockopen(): SSL operation failed with code 1. OpenSSL
Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong
version number

This leads to the question: does EE try to do someting like this

openssl s_client -tls -crlf -connect smtp.gmail.com:587

or

openssl s_client -ssl3 -crlf -connect smtp.gmail.com:587

instead of what our hoster finds to be the right way

openssl s_client -starttls smtp -crlf -connect smtp.gmail.com:587

He gave us this link for a reading http://blog.mailgun.com/25-465-587-what-port-should-i-use/

I just do understand a little of these thing and wonder if my hoster is right in saying EE has to send SMTP mails different than it does at the moment?

Or is our hoster not flexible enough? I know people on hosters that have no issues sending over port 465 all the time.

I appreciate some feedback on this.

  • 1
    I'll post this as a comment, as it's not really an answer to your question - and it's self-serving (as I'm the developer of this add-on): but have you considered using Escort instead of messing with SMTP? – Derek Hogue Feb 3 '15 at 14:30
1

The SMTP port is set in your Admin > Email Configuration. TLS is specified with the email_smtp_crypto system configuration override:

$config['email_smtp_crypto'] = 'tls';

With both of those in place, removing the protocol and the port from your server string should allow you to send via SMTP with those settings.

| improve this answer | |
  • Thank you Derek, it seem to work now. The server string is $config['smtp_server'] = 'smtp.gmail.com'; and settings like you suggested – Werner Gusset Feb 4 '15 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.