Bug #23170 See Comments

Errors when resending activation email via SMTP

Version: 3.5.7 Reporter: amadeus77

When trying to resend an activation email out of the CP I get the following error - even the first activation email does not arrive:

Warning

stream_socket_enable_crypto(): SSL: Handshake timed out

ee/legacy/libraries/Email.php, line 1949 show details

Severity: E_WARNING
Warning

Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:119)

ee/legacy/core/Input.php, line 249 show details

Severity: E_WARNING
Warning

Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:119)

ee/legacy/libraries/Functions.php, line 438 show details

Severity: E_WARNING
Notice

Trying to get property of non-object

ee/legacy/libraries/Email.php, line 2211 show details

Severity: E_NOTICE

Fatal error: Call to a member function load() on null in /***/***/***/***/system/ee/legacy/libraries/Email.php on line 2211

This only occurs when the outgoing email protocol is set to SMTP. But I would like to use SMTP protocol for spam reasons. I double checked the credentials and ports for the smtp connection. The serverinfo is:

(SMTP): smtp.office365.com Port: 587 SSL: Yes (STARTTLS)

  • This doesn’t look like a bug, but rather a misconfiguration with using Office365 as a relay for your self-hosted web site’s emails. You’re only seeing these PHP errors during this specific operation because of being a logged in super admin on an action that attempts to send an email without redirecting (such as member registration would do).

    I would suggest using the Developer > Utilities > Communicate tool to send test emails as you’re working through your configuration issues. With Office 365, I believe you also need to set your Newline character to \r\n. If you need further assistance, please put in a support ticket and we’d be happy to look at the issue on your environment for you.

    Derek Jones
    06th July, 2017 at 11:11am
  • I don’t see a misconfiguration in Office 365. I found this site: https://support.office.com/en-us/article/How-to-set-up-a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4

    When I try sending in ee through SMTP with the method mentioned above I get:

    Error: Unable to send email at this time.
    
    220 DB6PR0202CA0004.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 17 Jul 2017 11:22:19 +0000 
    
    hello: 250-DB6PR0202CA0004.outlook.office365.com Hello [134.119.233.18]
    250-SIZE 157286400
    250-PIPELINING
    250-DSN
    250-ENHANCEDSTATUSCODES
    250-STARTTLS
    250-8BITMIME
    250-BINARYMIME
    250-CHUNKING
    250 SMTPUTF8
    starttls: 220 2.0.0 SMTP server ready
    hello: 250-DB6PR0202CA0004.outlook.office365.com Hello [134.119.233.18]
    250-SIZE 157286400
    250-PIPELINING
    250-DSN
    250-ENHANCEDSTATUSCODES
    250-AUTH LOGIN XOAUTH2
    250-8BITMIME
    250-BINARYMIME
    250-CHUNKING
    250 SMTPUTF8
    from: 250 2.1.0 Sender OK
    to: 250 2.1.5 Recipient OK
    data: 354 Start mail input; end with .
    
    The following SMTP error was encountered: 
    Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
    Notice
    
    Trying to get property of non-object
    
    ee/legacy/libraries/Email.php, line 2211 show details
    
    
    Fatal error: Call to a member function load() on null in /***/***/system/ee/legacy/libraries/Email.php on line 2211
    amadeus77
    17th July, 2017 at 7:30am
  • Please check that you set the Newline to use \r\n in your email settings and contact support if you need further assistance, that still indicates that your configuration are incompatible with Microsoft’s SMTP servers.

    Derek Jones
    17th July, 2017 at 10:24am

You must be signed in to comment on a bug report.

ExpressionEngine News

#eecms, #events, #releases