dazz_club Posted April 8, 2008 Share Posted April 8, 2008 Hi all, I making a basic email script and so far so good. i test the email by completing the form, i then check my email account to see if its turned up. Its there, all is good, but when i go to read it, i can see in the from section of the headers it reads , basiclly this email was sent by (my serverhost) on behalf of me, (displays my email) This is what is displayed when i open up the email to read it From: awss[at]server11.kthosting.com on behalf of [email protected] Sent: 08 April 2008 10:33:23 Reply-to: darren[at]yahoo.co.uk To: darrenpaulazzopardi[at]hotmail.com is this something to do with my host not allowing me to send emails from the website or is it the php script; $to = "darrenpaulazzopardi[at]@hotmail.com"; $subject = "Your Free sample order"; $content = "sample:\n Thank you for your interest in our productTEST. Your sample will be despatched shortly"; $header = "From: [email protected]\r\nReply-To: [email protected]\n"; //spacer mail($to, $subject, $content, $header); Quote Link to comment https://forums.phpfreaks.com/topic/100115-from-doesnt-seem-to-appear-when-i-recieve-my-email/ Share on other sites More sharing options...
fri3ndly Posted April 8, 2008 Share Posted April 8, 2008 From: [email protected] Try an email address that could be real ie. [email protected] It should be easy to send from any e-mail address. I woiuld just use this (with pre-verification) <?php mail ('[email protected]', 'This is a subject', 'content here', 'From:[email protected]'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/100115-from-doesnt-seem-to-appear-when-i-recieve-my-email/#findComment-511873 Share on other sites More sharing options...
dazz_club Posted April 8, 2008 Author Share Posted April 8, 2008 Hi fri3ndly I've tried both of your suggestions earlier and it still appears that in the from section of my email it displays From: admin[at]server11.kthosting.com on behalf of darrenpaulazzopardi[at]hotmail.com i'll do some diggin about. kind regards Quote Link to comment https://forums.phpfreaks.com/topic/100115-from-doesnt-seem-to-appear-when-i-recieve-my-email/#findComment-511883 Share on other sites More sharing options...
ansarka Posted April 8, 2008 Share Posted April 8, 2008 Try this code ;) $to = "darrenpaulazzopardi[at]@hotmail.com"; $subject = "Your Free sample order"; $content = "sample:\n Thank you for your interest in our productTEST. Your sample will be despatched shortly"; $header = "From: [email protected]\nReply-To: [email protected]\n"; //spacer mail($to, $subject, $content, $header); [code] while writing the header section of mail you hv to put \r\n if your server is windows , if your server in linux you hv to pu tonly \n change [b][email protected]\r\nReply-To:[/b] TO [b][email protected]\nReply-To:[/b] [/code] Quote Link to comment https://forums.phpfreaks.com/topic/100115-from-doesnt-seem-to-appear-when-i-recieve-my-email/#findComment-511890 Share on other sites More sharing options...
dazz_club Posted April 8, 2008 Author Share Posted April 8, 2008 Hi Ansarka, I have tired that and still no luck. i have attached a link to an image which clearly displays my point, hopefully this makes more sense than i do. http://img260.imageshack.us/img260/9513/emailprobya1.png Quote Link to comment https://forums.phpfreaks.com/topic/100115-from-doesnt-seem-to-appear-when-i-recieve-my-email/#findComment-511945 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.