Author Topic: failing leaving message when op is offline  (Read 17082 times)

0 Members and 1 Guest are viewing this topic.

agentili

  • Full Member
  • ***
  • Posts: 15
failing leaving message when op is offline
« on: May 27, 2009, 11:35:40 PM »
After I click in send i get:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Inetpub\vhosts\agri.com\httpdocs\webim\libs\common.php on line 513

Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\vhosts\plantium.com.br\httpdocs\webim\libs\common.php:513) in C:\Inetpub\vhosts\agri.com\httpdocs\webim\libs\common.php on line 352

Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\vhosts\plantium.com.br\httpdocs\webim\libs\common.php:513) in C:\Inetpub\vhosts\agri.com\httpdocs\webim\libs\common.php on line 353

Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\vhosts\plantium.com.br\httpdocs\webim\libs\common.php:513) in C:\Inetpub\vhosts\agri.com\httpdocs\webim\libs\common.php on line 354

Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\vhosts\plantium.com.br\httpdocs\webim\libs\common.php:513) in C:\Inetpub\vhosts\agri.com\httpdocs\webim\libs\common.php on line 355

techgaia

  • Full Member
  • ***
  • Posts: 12
    • TechGaia Limited
Re: failing leaving message when op is offline
« Reply #1 on: May 28, 2009, 01:53:21 AM »
Why dont you just use sendmail? it's so much easier.

agentili

  • Full Member
  • ***
  • Posts: 15
Re: failing leaving message when op is offline
« Reply #2 on: May 28, 2009, 02:19:19 AM »
where and what do i change?

agentili

  • Full Member
  • ***
  • Posts: 15
Re: failing leaving message when op is offline
« Reply #3 on: May 28, 2009, 03:04:00 PM »
I need to authentificate my smpt....I should insert something like :
$host = "mail.example.com";
$username = "smtp_username";
$password = "smtp_password";
$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'auth' => true,
    'username' => $username,
    'password' => $password));

but my problem is where????? I tried in mail.php didnt work, I tried in leavemessage.php didnt work, tried in commom.php didnt work!!!! S.O.S :)

agentili

  • Full Member
  • ***
  • Posts: 15
Re: failing leaving message when op is offline
« Reply #4 on: May 28, 2009, 07:25:29 PM »
my Friend who is a genious in PHP fixed for it to work with smtp authentification, whoever have this problem, email me :arturmiller79@hotmail.com

Regards

Inspirer

  • Mibew Project founder
  • Native
  • *****
  • Posts: 262
    • Mibew Messenger
Re: failing leaving message when op is offline
« Reply #5 on: May 28, 2009, 08:25:02 PM »
Please, share the solution with us :)
Maybe we will include it as an option into the next release.

agentili

  • Full Member
  • ***
  • Posts: 15
Re: failing leaving message when op is offline
« Reply #6 on: May 28, 2009, 08:31:37 PM »
oka but I am very PhpSTUPID....so i will show paste what I think he did...dont ask me nothing I have clue...

require_once('class.phpmailer.php');


$mail = new PHPMailer();

$mail->IsSMTP(); // send via SMTP
$mail->isHTML(true);
//$mail->SMTPDebug = 2;
$mail->Host = "smtp.ursite.com.br"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "info@ursite.com.br";
$mail->Password = "1234";

$mail->From = "info@ursite.com.br";
$mail->FromName = "Customer Service";
$mail->AddReplyTo ("info@ursite.com.br");
$mail->AddAddress("info@ursite.com.br");

$mail->Subject = "Contact from Website";
$mail->Body = wordwrap(myiconv($webim_encoding, $mail_encoding, $body),70);

$mail->Send();
//  echo "Message Sent OK</p>\n";
   
/*   mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding, $mail_encoding, $body),70), $headers);*/

   
}

He added this class.phpmailer.php file...and some other 2 files I cant find..he told me they are library.
This help?if this help maybe you should add a "check button" stmp authentification in the program and 3 field: smtp, user, password

agentili

  • Full Member
  • ***
  • Posts: 15
Re: failing leaving message when op is offline
« Reply #7 on: May 28, 2009, 08:43:09 PM »
all of that he added it under:
function webim_mail($toaddr, $reply_to, $subject, $body) {
   global $webim_encoding, $webim_mailbox, $mail_encoding;
   
   $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);

HERE GOES WHAT HE ADDED

armychina

  • Jr. Member
  • **
  • Posts: 4
Re: failing leaving message when op is offline
« Reply #8 on: June 10, 2009, 06:59:03 AM »
is there a patch for openwebim 1.6.1?

my hosting server need to config smtp server and account to send offline mail message.