Has anyone figured out how to configure zend-mail for sending SMTP email?  Surely, surely the Elgg end user doesn't have to download, install and then configure the zend framework IDE via Composer, surely.  I have been working on this problem for a while now, today is day number ten, frankly speaking this is getting to be seriously frustrating.  

Is there a file that I can edit in order to use the Elgg built-in email function?

  • Which Elgg version are you using?

    The latest version of Elgg have the config option for smtp in settings.php in the elgg-config folder:

     * Configure emailer transport
     * This setting can be used to select a different emailer transport. By default the Zend Sendmail Transport is used.
     * Currently only 'smtp' and 'sendmail' are supported as a different configuration.
     * For 'smtp', the SMTP server's settings must be set, while 'sendmail' requires no configuration.
     * @global string $CONFIG->emailer_transport
    //$CONFIG->emailer_transport = 'sendmail';
     * Configure emailer SMTP settings
     * This setting is only necessary if the above emailer transport is set to 'smtp'.
     * Please refer to https://docs.zendframework.com/zend-mail/transport/smtp-options/#configuration-options
     * and https://docs.zendframework.com/zend-mail/transport/smtp-authentication/#examples
    //$CONFIG->emailer_smtp_settings = array(
    //    'name'              => 'localhost.localdomain',
    //    'host'              => '',
    //    'port'              => 25,
    //    'connection_class'  => 'login',
    //    'connection_config' => [
    //        'username' => 'user',
    //        'password' => 'pass',
    //        'ssl'      => '', // OPTIONAL (tls or ssl)
    //        'port'     => '', // OPTIONAL (Non-SSL default 25, SSL default 465, TLS default 587)
    //        'use_complete_quit' => '', // OPTIONAL
    //    ],

    You would have to uncomment the config options. $CONFIG->emailer_transport would have to be smtp. And the array entries to be set in $CONFIG->emailer_smtp_settings depend on the smtp server you intent to use.

  • Thank you ever, ever so much, this is exactly what I was looking for!

  • Exactly the hint I was looking for, I certainly do thank you for your attention in answering this post.

  • @Claudius: please update if its working for you. For me it was not working even after making those changes. 

    Please see Configuring SMTP settings : Elgg.org