Jump to content


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


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

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.";
$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):

(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

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites
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

Share this post

Link to post
Share on other sites


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.