Email smtp not funtion
Brought to you by:
jberanek
hai admin MRBS i want to setting email smtp. my detail server.
why i can`t recive email report
plz help me
my setting config.inc.php
/**********************************************
* Email settings
**********************************************/
// WHO TO EMAIL
// ------------
// The following settings determine who should be emailed when a booking is made,
// edited or deleted (though the latter two events depend on the "When" settings below).
// Set to TRUE or FALSE as required
// (Note: the email addresses for the room and area administrators are set from the
// edit_area_room.php page in MRBS)
$mail_settings['admin_on_bookings'] = TRUE; // the addresses defined by $mail_settings['recipients'] below
$mail_settings['area_admin_on_bookings'] = FALSE; // the area administrator
$mail_settings['room_admin_on_bookings'] = FALSE; // the room administrator
$mail_settings['booker'] = TRUE; // the person making the booking
$mail_settings['book_admin_on_approval'] = FALSE; // the booking administrator when booking approval is enabled
// (which is the MRBS admin, but this setting allows MRBS
// to be extended to have separate booking approvers)
// WHEN TO EMAIL
// -------------
// These settings determine when an email should be sent.
// Set to TRUE or FALSE as required
//
// (Note: (a) the variables $mail_settings['admin_on_delete'] and
// $mail_settings['admin_all'], which were used in MRBS versions 1.4.5 and
// before are now deprecated. They are still supported for reasons of backward
// compatibility, but they may be withdrawn in the future. (b) the default
// value of $mail_settings['on_new'] is TRUE for compatibility with MRBS 1.4.5
// and before, where there was no explicit config setting, but mails were always sent
// for new bookings if there was somebody to send them to)
$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
// WHAT TO EMAIL
// -------------
// These settings determine what should be included in the email
// Set to TRUE or FALSE as required
$mail_settings['details'] = TRUE; // Set to TRUE if you want full booking details;
// otherwise you just get a link to the entry
$mail_settings['html'] = FALSE; // Set to true if you want HTML mail
$mail_settings['icalendar'] = FALSE; // Set to TRUE to include iCalendar details
// which can be imported into a calendar. (Note:
// iCalendar details will not be sent for areas
// that use periods as there isn't a mapping between
// periods and time of day, so the calendar would not
// be able to import the booking)
// HOW TO EMAIL - LANGUAGE
// -----------------------------------------
// Set the language used for emails (choose an available lang.* file).
$mail_settings['admin_lang'] = 'en'; // Default is 'en'.
// HOW TO EMAIL - ADDRESSES
// ------------------------
// The email addresses of the MRBS administrator are set in the config file, and
// those of the room and area administrators are set though the edit_area_room.php
// in MRBS. But if you have set $mail_settings['booker'] above to TRUE, MRBS will
// need the email addresses of ordinary users. If you are using the "db"
// authentication method then MRBS will be able to get them from the users table. But
// if you are using any other authentication scheme then the following settings allow
// you to specify a domain name that will be appended to the username to produce a
// valid email address (eg "@domain.com").
$mail_settings['domain'] = '';
// If you use $mail_settings['domain'] above and username returned by mrbs contains extra
// strings appended like domain name ('username.domain'), you need to provide
// this extra string here so that it will be removed from the username.
$mail_settings['username_suffix'] = '';
// HOW TO EMAIL - BACKEND
// ----------------------
// Set the name of the backend used to transport your mails. Either 'mail',
// 'smtp' or 'sendmail'. Default is 'mail'.
$mail_settings['admin_backend'] = 'smtp';
/*******************
* Sendmail settings
*/
// Set the path of the Sendmail program (only used with "sendmail" backend).
// Default is '/usr/bin/sendmail'
//$sendmail_settings['path'] = '/usr/bin/sendmail';
// Set additional Sendmail parameters (only used with "sendmail" backend).
// (example "-t -i"). Default is ''
//$sendmail_settings['args'] = '';
/*******************
* SMTP settings
*/
// These settings are only used with the "smtp" backend
$smtp_settings['host'] = 'ssl://smtp.gmail.com';; // SMTP server
$smtp_settings['port'] = 465; // SMTP port number
$smtp_settings['auth'] = TRUE; // Whether to use SMTP authentication
$smtp_settings['username'] = 'lksa.svr@gmail.com'; // Username (if using authentication)
$smtp_settings['password'] = ''; // Password (if using authentication)
// EMAIL - MISCELLANEOUS
// ---------------------
// Set the email address of the From field. Default is 'admin_email@your.org'
$mail_settings['from'] = 'lksa.svr@gmail.com';
// The address to be used for the ORGANIZER in an iCalendar event. Do not make
// this email address the same as the admin email address or the recipients
// email address because on some mail systems, eg IBM Domino, the iCalendar email
// notification is silently discarded if the organizer's email address is the same
// as the recipient's.
$mail_settings['organizer'] = 'fitrie.ridzuan@prolintas.com.my';
// Set the recipient email. Default is 'admin_email@your.org'. You can define
// more than one recipient like this "john@doe.com,scott@tiger.com"
$mail_settings['recipients'] = 'fitrie.ridzuan@prolintas.com.my';
// Set email address of the Carbon Copy field. Default is ''. You can define
// more than one recipient (see 'recipients')
$mail_settings['cc'] = 'jebat84@gmail.com';
// Set to TRUE if you want the cc addresses to be appended to the to line.
// (Some email servers are configured not to send emails if the cc or bcc
// fields are set)
$mail_settings['treat_cc_as_to'] = TRUE;
// The filename to be used for iCalendar attachments. Will always have the
// extension '.ics'
$mail_settings['ics_filename'] = "booking";
The config settings look OK (assuming you've just deleted the password before posting the config). Have a look in your error_log to see what error messages you are getting. For more details set
If you are running MRBS 1.5.0 and aren't sure where your error log is, you can direct debug output to the browser by setting
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
ok now email funtion. tanks you campbell
how to cc ?
$mail_settings['cc'] = 'jebat84@gmail.com; latifah@prolintas.com.my; hamizah@prolintas.com.my';
Separate multiple addresses with commas, it's only Outlook that uses semi-colons to separate multiple email addresses
I've added some more email address validation to the default branch in changeset 2a31d5467ac8.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
Failed to send email: Could not instantiate mail function.
Did you replace the semi-colons with commas?
I'm confused by the error, as it shows that PHPmailer is trying to use the PHP 'mail' function, but you've said you have configured MRBS for SMTP delivery.
Could you ensure you definitely have the following set, and only one line like this?
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
Hi All;
We are follow the setup for SMTP as below. Our room booking MRBS 1.4.11 is working fine until yesterday 5/12/22017. Now it is not working because: Error sending email: Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: (code: -1, response: )]
I do not know why is not working. Please advise me. Thanks.
/ These settings are only used with the "smtp" backend $smtp_settings['host'] = 'ssl://smtp.gmail.com'; // SMTP server
$smtp_settings['port'] = 465; // SMTP port number
$smtp_settings['auth'] = TRUE; // Whether to use SMTP authentication
$smtp_settings['secure'] = 'ssl'; // Encryption method: 'tls' or 'ssl'
$smtp_settings['username'] = 'roombookingadmin@bisvietnam.net';
Last edit: Anonymous 2017-12-06
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
Hi,
Did you solve your problem? I got the same situation.
Try switching to TLS
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
hi, Campbell
My mrbs version is 1.5.0, but it is not working since 2017/12/5.
It can't send mail because "Failed to send email: SMTP connect() failed."
My SMTP setting:
Can you advise what should I do now?
Last edit: Campbell Morrison 2017-12-29
First of all you should immediately change your gmail password.
Next, I suggest you upgrade to MRBS 1.7.0 and then turn on mail debugging by setting
This will give you more information about why mail is failing.
It's possible, if you are using PHP 5.6 or above, that the error message you will see is
Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
If you get this then you should follow the adivice on "Certificate verification failure" in https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting.
Hi, Campbell,
I'm confused by the error, can u help me?
Last edit: Campbell Morrison 2019-02-07
What are your values of $smtp_settings in your config file? (Leave out sensitive information such as host, username and password).
$smtp_settings['host'] = 'ssl://smtp.gmail.com';; // SMTP server
$smtp_settings['port'] = 25; // SMTP port number
$smtp_settings['auth'] = TRUE; // Whether to use SMTP authentication
$smtp_settings['secure'] = 'ssl'; // Encryption method: 'tls' or 'ssl'
$smtp_settings['username'] = '**'; // Username (if using authentication)
$smtp_settings['password'] = '*'; // Password (if using authentication)
Try
Returned this...
Last edit: Campbell Morrison 2019-02-07
Try adding
Though if that works see https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting and note the comments under "Certificate verification failure"
I found the error... The e-mail that i was using not authorize the use of this system to transport unsolicited... I just modified the e-mail and sucess... Thank u a lot my friend.
I'm confused by the error message - it looks like your hosting company/organisation is intercepting connections to smtp.gmail.com, which is a very dubious thing to do security-wise!!
A connection like that should either be allowed and get straight to Gmail, or it should be blocked by the firewall.