Mohammed Nasman
asked on
PHPMailer, return to sender functionality
Hello,
I would like to have email return to sender functionality if the email is not valid, I have tried this code, but it didn't work, any clue about this?
...
include("class.phpmailer.p hp");
$mail = new PHPMailer();
$mail->IsMail();
$mail->From = $from;
$mail->ConfirmReadingTo = $from;
$mail->FromName = "";
$mail->AddAddress($to);
$mail->AddCC($cc);
$mail->AddBCC($bcc);
$mail->AddReplyTo($from, "");
if ($mail->Send())
.....
Regards,
Mohammed
I would like to have email return to sender functionality if the email is not valid, I have tried this code, but it didn't work, any clue about this?
...
include("class.phpmailer.p
$mail = new PHPMailer();
$mail->IsMail();
$mail->From = $from;
$mail->ConfirmReadingTo = $from;
$mail->FromName = "";
$mail->AddAddress($to);
$mail->AddCC($cc);
$mail->AddBCC($bcc);
$mail->AddReplyTo($from, "");
if ($mail->Send())
.....
Regards,
Mohammed
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$mail->Sender = "email@address.exp";
ASKER
hi nplib, i tried that too after read it in phpmailer doc, but didn't work
i think the problem as hernst42 said, I need to change it to use SMTP, I tried it but got errors, even i put server and username/password
could any one give me a complete sample for sending email with smtp and have the return path?, sorry I'm not good in php, this is just a fix i have to do for part from a big application i have
i think the problem as hernst42 said, I need to change it to use SMTP, I tried it but got errors, even i put server and username/password
could any one give me a complete sample for sending email with smtp and have the return path?, sorry I'm not good in php, this is just a fix i have to do for part from a big application i have
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER