PDA

Click to See Complete Forum and Search --> : [RESOLVED] Help needed trying to set up a phpmailer script on Linux


jcavard
Feb 22nd, 2006, 01:17 PM
Hi!

I'm trying to set up a phpmailer script on a linux system. I'm having some issue when sending mail. I get no error whether I use


$mail->Mailer = "mail";


$mail->Mailer = "sendmail";


$mail->Mailer = "smtp";


as if it would be sent successfully, however I don't receive any email..... here is my code. Thank y'all


<?php
require("class.phpmailer.php");

$mail = new phpmailer();

$mail->From = "mail@groupeghyperforme.com";
$mail->FromName = "List manager";
$mail->Host = "localhost";
$mail->Mailer = "smtp";

// HTML body
$body = "Hello <font size=\"4\">FULL_NAME</font>, <p>";
$body .= "<i>Your</i> personal photograph to this message.<p>";
$body .= "Sincerely, <br>";
$body .= "phpmailer List manager";

// Plain text body (for mail clients that cannot read HTML)
$text_body = "Hello FULL_NAME, \n\n";
$text_body .= "Your personal photograph to this message.\n\n";
$text_body .= "Sincerely, \n";
$text_body .= "phpmailer List manager";

$mail->Body = $body;
$mail->AltBody = $text_body;
$mail->AddAddress("jc.avard@luxury-design.com", "FULL_NAME");
$mail->AddAddress("jc.avard@neta.ca", "FULL_NAME");
//$mail->AddStringAttachment($row["photo"], "YourPhoto.jpg");

if(!$mail->Send())
echo "There has been a mail error";

// Clear all addresses and attachments for next loop
$mail->ClearAddresses();
$mail->ClearAttachments();

?>

visualAd
Feb 22nd, 2006, 05:02 PM
What mailer are you using?

jcavard
Feb 22nd, 2006, 08:12 PM
I need to add attachement to the mail, so I first thought I had to go with SMTP, is it right???

anyway, I tried 3 of them and I get suyccess message and no mail delivered..
do I have to setup anything else ???

visualAd
Feb 23rd, 2006, 12:35 AM
Mail is always sent via stmp, regardless of the application. If you tell me which mailer script you are using I might be able to help.

jcavard
Feb 23rd, 2006, 07:36 AM
PHPMailer that is...

but I got it working... don't ask me what I was doing wrong, but it works just great now...