Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have been experiencing problems trying to send emails with php using the mail() command.
I have found that the mail command is sensitive to the content of the e-mail being sent, especially when there is html code in the e-mail, and even more often with <a> tags.
Example:Code: Select all
<?php
$msg = "....";
$to = "email@server.com";
$subject = "Subject";
$mailheaders = "From : fromEmail \n";
$mailheaders .= "Reply-To : fromEmail@server.com\r\nContent-type: text/html; charset=us-ascii";
mail($to, $subject, $msg, $mailheaders);
?>1. It failed when $msg included the text
"<a href='http://www.ifesbuyersguide.org/classifieds.php'>View now</a>"
But it worked with
"<a href='http://www.ifesbuyersguide.org/classifi ... .php'>View now</a>"
I have found the same thing in other cases, where a link t a particular url causes the mail() command to fail
2. Once, I had a $msg that did not work until I removed a "<br/>" tag. Once I removed that tag, it worked fine. However, I've used <br/> tags with no problem in other emails.
Anybody have any idea what's going on here?
Thanks,
Nate
Everah | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
