Sending an email via php mailer I get "myemail via host.blabla" in sender, how to remove that?
I have this phpmailer which is blasting emails and when recieving the email the sender is : myemail@myemail.com via web258.opentransfer.com (my host)
thats my code:
// Real Email Blast:
$mail = new PHPMailer();
$mail->From = "myemail@email.com";
$mail->FromName = "myname";
$mail->AddAddress($email, $name);
$mail->Subject = $htmlTitle = st开发者_运维问答ripslashes($reSubject);
$mail->Body = $htmlBody = "
<div style='direction: rtl; text-align: right;'>
".stripslashes($reEmailContents)."
</div>";
// Setting plain text:
$text_body = $htmlTitle."
".strip_tags($htmlBody);
$mail->AltBody = $text_body;
if (!$mail->Send()) {
// Email failed error, resending user to landing page:
$error .= "<span style='color: #D20005;'>- Failed sending email to: ".$email." (".$name.")</span><br>";
}
that's especially visible on outlook and on gmail when you access the email itself you can see it on the sender box - how can I remove this and send without the host?
That's the intention of the "via yourdomainhere.com"
I don't believe you can change it, unless you run a custom mail server on your site (which may not be possible on a shared host)
Irregardless, your question would probably be better suited for ServerFault since PHPMailer isn't the issue.
精彩评论