Jump to content

problem when using mail()


bluetoother

Recommended Posts

i noticed when i send email via php mail() functionto my yahoo or hotmail email for testingthe From field in the email is filled with the name of the host serverthat hosts my web sitebut i want the specified "From" field that i inserted in the head section in mail functionto be shown as the sender of the emailany body know how to solve this matter ?

Link to comment
Share on other sites

this is the format that i use and it works just fine, i think the from section has to be a valid exsisting email address on your server for it to work.( so i have read some where)

$to = "info@i-s-a-f-e.com"; // OR you could use $to = $email  <-- if the email is in the variable $email$headers = "From: small business search engine <community@i-s-a-f-e.com>\r\n";$headers .= 'Reply-To: Community <community@i-s-a-f-e.com>';$title = "Your stuff";$body = <<< emailbodyHere is the message you are trying to sendvaraiable are written in this format$varhave a great dayemailbody;$success = mail($to,$title,$body,$headers);

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...