Connecting Tech Pros Worldwide Help | Site Map

php mail problem

Dave Calhoun
Guest
 
Posts: n/a
#1: Jul 17 '05
I think I have it narrowed down. If I do "sendmail -t dave@myhost.com"
it works great. No errors in the log. If I do "mail -s "test"
dave@myhost.com" it also works great. No errors in the log. So I feel
good in saying that sendmail is working properly. According to the
www.php.net website sendmail is what php uses. I also verified this in
the php.ini file.

So that leaves either a misconfiguration in php or bad data being fed to
the mail client. I did a "mail("dave\@myhost.com","test subject", "Test
Body"); " as suggested and the email goes thru but the log file shows
the crcr error. So even though the data being fed to the mail program is
simple strings, with absolutely no end of line characters, it still
generates errors.

Soooo, I think that leaves me with a php problem. An idea how I should
procede?

Dave
Ken Robinson
Guest
 
Posts: n/a
#2: Jul 17 '05

re: php mail problem


Dave Calhoun wrote (in part):
[color=blue]
> So that leaves either a misconfiguration in php or bad data being fed to
> the mail client. I did a "mail("dave\@myhost.com","test subject", "Test
> Body"); " as suggested and the email goes thru but the log file shows
> the crcr error. So even though the data being fed to the mail program is
> simple strings, with absolutely no end of line characters, it still
> generates errors.[/color]

Why are you escaping the '@' in your string? You don't have a 'From: '
header.
Try:
<?
mail('dave@myhost.com','test subject','test body','From:
you@myhost.com','-f you@myhost.com');
?>

Ken

Closed Thread