Menu

Error sending mail via SMTP

Gio
2019-11-29
2019-12-02
  • Gio

    Gio - 2019-11-29

    Hi,
    I'm trying to configure iTop to use SMTP instead of PHPMail to send mail via Exchange on Office 365.
    I set followig line on "config-itop.php" file:

    'email_transport' => 'SMTP',
    'email_transport_smtp.host' => 'smtp.office365.com',
    'email_transport_smtp.port' => '465', //tried also 587
    'email_transport_smtp.encryption' => 'SSL', // tried also STARTTLS
    'email_transport_smtp.username' => 'help@xxxx.com',
    'email_transport_smtp.password' => 'xxxyyyy',
    

    I tried also using gmail address, but the error is always:
    "Error: 'Connection could not be established with host localhost [Unable to find the socket transport "SSL" - did you forget to enable it when you configured PHP? #1]'"

    It seems like php does not find php-openssl, however phpinfo() shows:
    openssl
    OpenSSL support enabled
    OpenSSL Library Version OpenSSL 1.0.2k-fips 26 Jan 2017
    OpenSSL Header Version OpenSSL 1.0.2k-fips 26 Jan 2017
    Openssl default config /etc/pki/tls/openssl.cnf

    I'm using:
    iTop version 2.3.3-3159 built on 2016-12-22 17:35:48
    Data model: 2.3.0
    MySQL: 5.7.28
    PHP: 5.6.40

    Any idea how can I get SSL SMTP working?

     

    Last edit: Gio 2019-12-02
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2019-11-29

    May we assume email_transport_smtp.host points to the proper O365 URL?
    ( since your error does seem to suggest it's trying to connect to localhost instead )

     

    Last edit: Jeffrey Bostoen 2019-11-29
    • Gio

      Gio - 2019-12-02

      Yes, I forgo t to mention, string is:
      'email_transport_smtp.host' => 'smtp.office365.com',

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.