Author Topic: Sending emails doesn't work.  (Read 6571 times)

0 Members and 1 Guest are viewing this topic.

mavemania

  • Jr. Member
  • **
  • Posts: 2
Sending emails doesn't work.
« on: April 10, 2012, 12:06:29 AM »
Hi I wonder if anyone else had this problem and find a fix...
I followed the installation steps end everything works great so far except sending emails. I get no errors, just confirmation that the message was sent. The PHP mail is ok, as I have another script on the same server which works
Here is the webim_mail function in notify.php which I dont think is working:

function webim_mail($toaddr, $reply_to, $subject, $body, $link)
{
   global $webim_encoding, $webim_mailbox, $mail_encoding, $current_locale;

   $headers = "From: $webim_mailbox\r\n"
            . "Reply-To: " . myiconv($webim_encoding, $mail_encoding, $reply_to) . "\r\n"
            . "Content-Type: text/plain; charset=$mail_encoding\r\n"
            . 'X-Mailer: PHP/' . phpversion();

   $real_subject = "=?" . $mail_encoding . "?B?" . base64_encode(myiconv($webim_encoding, $mail_encoding, $subject)) . "?=";

   $body = preg_replace("/\n/", "\r\n", $body);

   mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding, $mail_encoding, $body), 70), $headers);
}

?>


mavemania

  • Jr. Member
  • **
  • Posts: 2
Re: Sending emails doesn't work.
« Reply #1 on: April 10, 2012, 12:20:47 AM »
I got the solution. I didn't put any email address in Settings in Admin panel

bambosz

  • Jr. Member
  • **
  • Posts: 4
Re: Sending emails doesn't work.
« Reply #2 on: April 23, 2012, 04:44:29 PM »
Glad you have figured it out, if anyone is looking how to use SMTP instead of sendmail

http://mibew.org/forums/index.php/topic,469.msg6336.html#msg6336