Jump to content

Strange From output sending an email ***SOLVED***


Humpty

Recommended Posts

***SOLVED*** (thanks to Daniel0)

G'day Guys,

I get some strange out put for the "FROM" when recieving an email.

Code used:
[code]$frmName="Online Livestock Sales - Join Auth Confitmation Code";
$frmSubject="Online Livestock Sales - Join Auth Confitmation Code";
$mystr=" Thankyou for joining onlinelivestocksales.com.\n\n All you need to do now is login and quote this authentication code to become activated: \n\n Authenticatin Code: " . $SpecialCode ." \n\nRegards,\n The onlinelivestocksales.com Team.";
$frmEmail="[email protected]";
$uFromWho = "From:$frmName\r\nReply-to: $frmEmail\r\nX-Mailer: PHP/" . phpversion();

mail($uEmail, $frmSubject, $mystr, $uFromWho);[/code]

But the email I get ends up having this displayed in the from field (MS Otlook):
[email protected]_HERE.ISP_NAME_HERE.com

(CITY_HERE.ISP_NAME_HERE was changed from the real details to that displayed by me for posting on the forum.  The strange part is that the service info that is added on the end is the recieving mail server, not the sending mail server, and I don't understand where the full stops come from)

Thanks guys
Change [code]$uFromWho = "From:$frmName\r\nReply-to: $frmEmail\r\nX-Mailer: PHP/" . phpversion();[/code] to [code]$uFromWho = "From: {$frmName} <{$frmEmail}>\r\nReply-to: {$frmName} <{$frmEmail}>\r\nX-Mailer: PHP/" . phpversion();[/code]

Note that it's not the curly brackets that do it, I just think it looks nicer.
Thankyou very much for that I appreciate it.

Worked a treat.  I've used the previous for a while now without any problems like that.

I don't pretend to understand it (even though i did read info RE it when i first used it) but I will use that code from now on.

Again Thanks.  you da man

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.