Re: [Phpmailer-general] [***SPAM*** Score/Req: 18.3/7.2] Re: [***SPAM*** Score/Req: 18.3/7.2] Pb us
A full-featured email creation and transfer class for PHP
Brought to you by:
coolbru
From: Johan L. <jo...@li...> - 2012-02-17 09:58:15
|
Well, then I am sure that you, of course, fix the problem by your own. Stéphane Cesbron skrev 2012-02-17 10:32: > Of course it is allowed to use both ports. > > Le 16/02/2012 16:36, Johan LInnér a écrit : >> Stéphane Cesbron skrev 2012-02-16 12:09: >>> Hi, >>> >>> I'm running out to trouble using PHPMailer. Simple mail notifications >>> without authentification works great. Nevertheless when I'm trying to >>> turn on authentification, I'm getting the following error : >>> SMTP -> ERROR: Failed to connect to server: (0) >>> >>> Here's the php code used : >>>> <?php >>>> require('PHPMailer_5.2.1/class.phpmailer.php'); >>>> >>>> $mail = new PHPMailer(); >>>> $mail->IsSMTP(); // telling the class to use SMTP >>>> $mail->SMTPAuth = true; // turn on SMTP authentication >>>> $mail->SMTPSecure = "ssl"; >>>> $mail->Port = 587; >>>> //$mail->Host = "smtp.inserm.fr"; // SMTP server >>>> $mail->Host = "smtp-tls.univ-nantes.fr"; // SMTP server >>>> //$mail->Host= "smtp.univ-nantes.prive"; >>>> $mail->Username = "cesbron-s"; >>>> //$mail->Username = "stephane.cesbron"; >>>> $mail->Password = "***********"; >>>> >>>> $mail-> From = "ste...@un..."; >>>> //$mail-> From = "ste...@in..."; >>>> $mail->SMTPDebug = 2; >>>> //$mail->FromName = "SwordShadow"; >>>> $mail->AddAddress("tes...@in..."); >>>> >>>> $mail->Subject = "First PHPMailer Message"; >>>> $mail->Body = "Hi! \n\n This is my first e-mail sent through >>>> PHPMailer."; >>>> //$mail->WordWrap = 50; >>>> >>>> >>>> if(!$mail->Send()) >>>> { >>>> echo 'Message was not sent.'; >>>> echo 'Mailer error: ' . $mail->ErrorInfo; >>>> } >>>> else >>>> { >>>> echo 'Message has been sent.'; >>>> } >>>> ?> >>> >>> Any ideas will be greatly welcomed, >>> Regards, >>> >> >> SSMTP normally use port 465 not 587. >> Is the web server allowed to make outgoing connections to port 465 (or >> 587)? >> >> // Johan Linner >> >> > |