Menu

#2505 SMTP not working on 1.10.0

None
closed
nobody
None
1
2022-03-14
2022-02-18
Gonzo1969
No

Hello Team,

I have tried to setup mail using smtp. Please find below my actual settings:

$mail_settings['admin_lang'] = 'de';
$mail_settings['domain'] = '';
$mail_settings['admin_backend'] = 'smtp';
$smtp_settings['host'] = '<smtpserver>';
$smtp_settings['port'] = 25;           // SMTP port number
$smtp_settings['auth'] = FALSE;        // Whether to use SMTP authentication
$smtp_settings['username'] = '';       // Username (if using authentication)
$smtp_settings['password'] = '';       // Password (if using authentication)
$mail_settings['disabled'] = FALSE;

$mail_settings['from'] = 'MRBS@maildomain';
$mail_settings['organizer'] = 'Organizer@maildomain';
$mail_settings['recipients'] = 'my.mail@maildomain';

$mail_settings['on_new']    = true;   // when an entry is created
$mail_settings['on_change'] = false;  // when an entry is changed
$mail_settings['on_delete'] = false;  // when an entry is deleted

$mail_settings['details']   = true;
$mail_settings['html']      = true;
$mail_settings['icalendar'] = true;

$mail_settings['ics_filename'] = "Buchung";

//$mail_settings['debug_output'] = true;
$mail_settings['debug_output'] = 'browser';

When creating a new booking there is no error message but also no mail is delivered. Is there maybe something that has also to be installed/configured on the linux web server to make mail run? Is sendmail a "must have"?

Many thanks for your help in advance
Best regards

Thomas

Discussion

  • Campbell Morrison

    You need to set at least one person to send mail to, eg

    $mail_settings['booker'] = true;
    
     
    • Gonzo1969

      Gonzo1969 - 2022-02-18

      Hello Campbell,

      I have added this sentence to my config but unfortunately it do not change something.

      The user's mail address comes from LDAP. I have configured it like follows:

      $ldap_email_attrib = 'mail';

      Authentication is working so I assume that the mail address will be read correctly.

      Do you maybe have got another idea what I have wrong here?

      Again many thanks for your help,
      best regards

      Thomas

       

      Last edit: Campbell Morrison 2022-02-18
  • Campbell Morrison

    I have just noticed that you have not got

    $mail_settings['debug'] = true;
    

    which will give you more clues.

     
    • Gonzo1969

      Gonzo1969 - 2022-02-18

      Hello Campbell,

      ... a good hint, thank you.

      Now I can see the following:

      2022-02-18 13:31:24 Connection failed. Error #2: stream_socket_enable_crypto(): Peer certificate CN=`mail.domain.com' did not match expected CN=`smtp.domain.com'
      [/var/www/html/mrbs/lib/PHPMailer/src/SMTP.php line 467]
      SMTP Error: Could not connect to SMTP host.
      

      Is there maybe a workaround for this? When I am using BLAT (for example) to send mails from the Windows CL then it is possible to easily use the SMTP server without any issues.

      Again many thanks,
      best regards

      Thomas

       

      Last edit: Campbell Morrison 2022-02-18
  • Campbell Morrison

    You could try one or both of

    $smtp_settings['ssl_verify_peer'] = false;
    $smtp_settings['ssl_verify_peer_name'] = false;
    

    Not recommended for the long term though.

     
    • Gonzo1969

      Gonzo1969 - 2022-03-08

      Hello Campbell,

      ,,, this is doing the job, thank you very much for your help! :)

      Best regards
      Thomas

       

      Last edit: Campbell Morrison 2022-03-14
  • John Beranek

    John Beranek - 2022-02-19

    Or, if the SMTP server has an SSL certificate of mail.domain.com instead of smtp.domain.com, then use mail.domain.com in MRBS config (if the DNS for that goes to the expected place)

     
  • Anonymous

    Anonymous - 2022-03-09

    Kudos for this one... fixed my issue as I too was using non authenticated smtp via an internal relay and it turns out the emails had stopped back in October after an upgrade... only just noticed :)

     
  • Gonzo1969

    Gonzo1969 - 2022-03-14

    How can I mark this threat as closed? :)

     
  • Campbell Morrison

    • status: open --> closed