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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending mail problem..

Status
Not open for further replies.

onaldi

Programmer
Aug 2, 2005
13
TR
I ve tried this mail script in two different servers.. but it doesnt work. what can be the problem. ? guees code is reliable coz it was working, but its very interesting that it doesnt work on different servers now?? i couldnt solve .. is there sth wrong in code?? thx.


$mailheaders = "From: ";
$mailheaders .= "Web Form";
$mailheaders .= "\n";
$mailheaders .= "Reply-To: ";
$mailheaders .= "info@blabla.com.tr";
$mailheaders .= "\n";
$mailheaders .= "Content-Type: text/html; charset=ISO-8859-9\n";

$htmlmail = <<<end_of_html_mail

my html here..

end_of_html_mail;
mail ("mymail@hotmail.com","Web Form",$htmlmail,$mailheaders);
 
A standard recommendation for all mail sent using PHP:
Start using the PHPMailer class available through sourceforge. It has all features you could ever ask for and will work.
 
also php mailer didnt work.. i think server has a problem.I ve tried the code with another server again. It works here, in another two servers it doesnt. thnks for reply. i ll ask it to server admin.
 
As you say: it is a strong indication that something with the server setup if faulty if PHPMailer doesn't work.
One idea: Have you considered putting not just "\n" but "\r\n" as line separators?
 
i ve tried many combinations, also ready made scripts.. the last reason is server. i call sys admin, and they say that "we ve a general problem". :) and i said why dont you try to email users about problem, i lost 1 day????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top