Jump to content

Recommended Posts

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);

 

 

 

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]');

?>

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

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]

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.