Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help needed using mail()

Status
Not open for further replies.

luckyblackcat

Programmer
Aug 15, 2002
19
GB
Hi,

I need a script to send an email.

I can send ok if I keep it simple ....

mail($to, $subject, $message);

as soon as I try to add $from or $headers the mail never arrives.

I need to have at least .. FROM on the email as it doesn't look good having my host servers _root in that field!

I did have a list of headers to help bypass junk mail filters. They don't seem to work. I'll include them just in case a 'real' expert is reading this. (lol)
==========================================================
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: php\n";
$headers .= &quot;From: \&quot;&quot;.$myname.&quot;\&quot; <&quot;.$myemail.&quot;>\n&quot;;
===========================================================

As I said help with from would be great anything else a real bonus.


Thanks for reading this.
 
Two suggestions of things to try:

At the end of each line, put \r\n, not just \n

Do not put the \n at the end of your additional headers. ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top