Open jberanek opened 6 years ago
I'd turn on debugging to get more information. Set the following in your config file:
$mail_settings['debug'] = true;
By default the output will go to your PHP error log. If you don't know where that is then you can send it to the browser by setting
$mail_settings['debug_output'] = 'browser';
Original comment by: campbell-m
Just noticed - assuming you are wanting to send mail using smtp, you need to set
$mail_settings['admin_backend'] = 'smtp'; // instead of 'mail'
Original comment by: campbell-m
That is correct. Sorry about that. I did make that change. Here is the output in the browser:
[DEBUG] Preparing email for deleted booking
[DEBUG] Preparing to send email ...
[DEBUG] Using backend 'smtp'
[DEBUG] Recipients: 'mcrockett@rvu.edu'
Connection: opening to smtp.office365.com:587, timeout=300, options=array ( 'ssl' => array ( 'verify_peer' => true, 'verify_peer_name' => true, 'allow_self_signed' => false, ),)
Connection: opened
SERVER -> CLIENT: 220 CY4PR20CA0021.outlook.office365.com Microsoft ESMTP MAIL Service ready at Fri, 12 Jan 2018 18:33:43 +0000
CLIENT -> SERVER: EHLO 172.16.30.231
SERVER -> CLIENT: 250-CY4PR20CA0021.outlook.office365.com Hello [209.33.250.98]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 2.0.0 SMTP server ready
CLIENT -> SERVER: EHLO 172.16.30.231
SERVER -> CLIENT: 250-CY4PR20CA0021.outlook.office365.com Hello [209.33.250.98]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-AUTH LOGIN XOAUTH2250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8
CLIENT -> SERVER: AUTH LOGIN
SERVER -> CLIENT: 334 VXNlcm5hbWU6
CLIENT -> SERVER: dXRzcmJzQHJ2dS5lZHU=
SERVER -> CLIENT: 334 UGFzc3dvcmQ6
CLIENT -> SERVER: Wm9vbGFuZGVyMSE=
SERVER -> CLIENT: 235 2.7.0 Authentication successful target host BLUPR02MB1106.namprd02.prod.outlook.com
CLIENT -> SERVER: MAIL FROM:admin_email@your.org
SERVER -> CLIENT: 250 2.1.0 Sender OK
CLIENT -> SERVER: RCPT TO:mcrockett@rvu.edu
SERVER -> CLIENT: 250 2.1.5 Recipient OK
CLIENT -> SERVER: DATA
SERVER -> CLIENT: 354 Start mail input; end with
So, permissions? Not sure how I would resolve this in Office 365.
Original comment by: *anonymous
You appear to have left the following setting at the default, you need to update it to a valid email address in your config.inc.php:
$mail_settings['from'] = 'admin_email@your.org';
Original comment by: jberanek
Ah! I saw that setting, and was about to try it, just before I saw your reply. It all works now. I would recommend that in the systemdefaults.inc.php file, this should probably not be under the EMAIL - MISCELLANEOUS section. Because this is a required setting, I would expect to find it higher in the list of settings. Just a thought. But you guys are awesome. Thanks again.
Original comment by: *anonymous
Hi, This project is great. You guys have done a good job with this. Thank you. However, I'm having problems with the mail settings. We're using Office 365, and I'm trying to use SMTP to send out the notification e-mails. Here is the code in my config.inc.php file:
// E-mail settings $url_base = "http://172.16.30.231"; // Current IP address of the test server $mail_settings['admin_lang'] = 'en'; $mail_settings['admin_backend'] = 'mail'; $smtp_settings['host'] = 'smtp.office365.com'; // SMTP server $smtp_settings['port'] = 587; // SMTP port number $smtp_settings['auth'] = true; // Whether to use SMTP authentication $smtp_settings['secure'] = 'tls'; // Encryption method: '', 'tls' or 'ssl' $smtp_settings['username'] = 'e-mail address of MRBS'; // Username (if using authentication) $smtp_settings['password'] = 'Password of the above e-mail'; // Password (if using authentication) // When an e-mail is sent $mail_settings['on_new'] = true; // when an entry is created $mail_settings['on_change'] = true; // when an entry is changed $mail_settings['on_delete'] = true; // when an entry is deleted // Who e-mail is sent to $mail_settings['area_admin_on_bookings'] = true; // the area administrator $mail_settings['booker'] = true; // the person making the booking
We use IMAP_PHP authentication, which is working well. I have added myself as the area admin. Based on the above code, I should be getting 2 e-mail notifications when I create an entry: 1 sent back to me as the booker, and 1 sent to me as the area admin. However, I'm not getting anything. Can you tell me what I'm doing wrong?
Reported by: *anonymous
Original Ticket: mrbs/support-requests/1412