#429 email send not working

open
nobody
None
1
2013-12-10
2013-12-04
Anonymous
No

i want to send a email to the room owner on a new booking. i use sendmail. when i try a test script for sendmail then it works:
$empfaenger = "mail@domainname.de";
$betreff = "Test des Mailversand";
$text = "Der Test scheint geklappt zu haben";
$extra = "From: Info info@domainname.de\r\n";
if(mail($empfaenger, $betreff, $text, $extra)) {
echo 'E-Mail versendet';
}

But mrbs does not send mails on a new booking. whats wrong?

in systemdefaults i have:
$mail_settings['admin_on_bookings'] = FALSE; // the addresses defined by $mail_settings['recipients'] below
$mail_settings['area_admin_on_bookings'] = FALSE; // the area administrator
$mail_settings['room_admin_on_bookings'] = TRUE; // the room administrator
$mail_settings['booker'] = FALSE; // the person making the booking
$mail_settings['book_admin_on_approval'] = FALSE; // the booking administrator when booki...

$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; // Set to TRUE if you want full booking details;
$mail_settings['html'] = TRUE; // Set to true if you want HTML mail
$mail_settings['icalendar'] = FALSE; // Set to TRUE to include iCalendar details

$mail_settings['admin_lang'] = 'de'; // Default is 'en'.

$mail_settings['admin_backend'] = 'sendmail';

$sendmail_settings['path'] = '/usr/sbin/sendmail'; // checked with phpinfo!

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-12-04

    the email of the room owner is set in the room by room_admin_email correctly

     
    Last edit: Anonymous 2014-03-24
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-12-05

    No help?
    in the functions_mail.inc is this part not work:
    // Call to the PEAR::Mail class
    $mail_object =& Mail::factory($backend, $params);
    $result = $mail_object->send($recipients, $mime['headers'], $mime['body']);

    currently i removed this lines an have made my own sendmail part:
    $header = 'From: info@example.com' . "\r\n" .
    'Reply-To: info@example.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    $result = mail($recipients, $subject, $text_body['content'], $header);
    This works fine.

    but i would be more happy if someone can help me to solve the main problem.
    thx

     
  • Campbell Morrison

    What versions of MRBS and PHP are you using?

    Campbell

     
  • John Beranek

    John Beranek - 2013-12-05

    Your code uses the mail() command, thereby using PHP's built-in mail routines, but you've configured MRBS to use the sendmail backend. What's your reasoning behind that?

    It would be more equivalent if you had:

    $mail_settings['admin_backend'] = 'mail';

     
    Last edit: John Beranek 2013-12-05
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-12-10

    HI

    check the logs and identify the service which used to send mail while booking (posffix/sendmail)

    i faced same issue and i used postfix instead of sendmail with relayhost added on main.cf

    Regards,
    Ben

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks