Author Topic: Not getting e-mail when chat is off (SOLVED)  (Read 18588 times)

0 Members and 1 Guest are viewing this topic.

SoMeGoD

  • Jr. Member
  • **
  • Posts: 1
Not getting e-mail when chat is off (SOLVED)
« on: November 27, 2012, 01:27:12 AM »
Hi there. First I'd like to apologize for any english mistakes. I'm from Brasil and English is not my first language. I'd like to thank everyone involved with this project. Thank you so much for this amazing software and thank you so much for making it free and open source.

I've recently installed the 1.6.4 version. I guess it is the lastest version of Mibew.
Everything works like a charm, except that when there is NO agents online so the user get the chance to send an email, I'm not receiving any email in my mailbox.

I've searched the forum for answers and I founded this topic: http://mibew.org/forums/index.php/topic,451.0.html
PHP mail is not my problem, since I have other website under the same domain apart from the one with mibew online that uses php code to send emails to me, and they work fine.

Also, I'm aware that the e-mail set in the config.php is the email to SEND messages, and not receive them.

My admin account as well as the operator accounts are set with the email on the Settings page. There is no empty emails on any account.

Users successfuly reach the leaveMessageSent and receive the "Thank you" message. So I'm guessing that is not a problem with the script since I'm not getting errors here.

The report painel record the sent message, but they never reach my email box, not even on Spam.

I haven't tried the Swiftemailer from this topic: http://mibew.org/forums/index.php/topic,469.0.html
Is this my next alternative or am I missing something? Like I said, I have other php scripts to receive forms that runs under the same domain and they work fine.

Hope someone can help me :)

Cheers from Brasil \o/

I took a look to see if my


The form is filled alright and the user can proceed to the next page with the The email don't reach my mailbox.

SOLVED ---------------------------------------------------------------------------------------/
Hi guys. I've just solved the problem. My provider request a aditional code for the email script to work on their services. If anyone from Brasil is hosted by Locaweb, you have to go /libs/notify.php and add the code highlighted in red

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);

   if (eregi('tempsite.ws$|locaweb.com.br$|hospedagemdesites.ws$|websiteseguro.com$', $_SERVER[HTTP_HOST])) {
        $emailsender='$webim_mailbox';} else {$emailsender = "$webim_mailbox";}


   @mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding, $mail_encoding, $body), 70) , $headers,"-r".$emailsender);
}

?>
« Last Edit: November 27, 2012, 04:01:27 AM by SoMeGoD »

dennis_braga

  • Jr. Member
  • **
  • Posts: 4
Re: Not getting e-mail when chat is off (SOLVED)
« Reply #1 on: February 18, 2013, 04:08:40 PM »
Cara, tenho a mesma situação que sua: Servidor Locaweb e sem enviar e-mail. Fiz exatamente as alterações que vc fez e ainda assim não consegui receber o e-mail. No meio do caminho, me sugiu uma dúvida: aqui mesmo no fórum, por vezes foi contradito onde eu setava o e-mail que receberia as notificações. Você pode me repassar isso, por favor? Grato se puder ajudar! :D
P.S.:Em português, pois não queria correr o risco de ser mal entendido ou me expressar errado.

Dude, I have the same situation here: Locaweb server and without sending the God damm email. I did exactly the same as you and I still don't received the email. On my way to here, a dubt come on my mind: even have in the forum seems to here a missunderstood about where a set up a email to receive notifications. Could you help me with that, please? Since now, thanks for your help! :D
« Last Edit: February 18, 2013, 04:12:40 PM by dennis_braga »