[TriLUG] sending mail with PHP
Brian Henning
brian at strutmasters.com
Thu Sep 2 15:02:39 EDT 2004
Isn't Apache 2.X supposed to be more secure and all that fun?
anyhow..
I'm trying to write a PHP script to send an e-mail containing data filled
into a form on a web page. Simple stuff. Only problem is, the mail doesn't
get delivered. I think I know the basis of the problem, but I'm not at all
sure how to fix it. I think it's related to the mail command in a shell not
working correctly (i.e. mail sent using said command does not get
delivered).
What I think the problem is, is that sendmail (or mail) isn't correctly
qualifying the From: in the message. It's getting qualified as
sender at localhost.localdomain instead of sender at strutmasters.com , and that
appears to be causing it to be bounced because of invalid domain name.
I don't often send mail from the command line (although I sometimes do), but
the mail function of the PHP script is critical, so a resolution is a fairly
high priority for me.
Any suggestions?
Thanks a bunch,
~Brian
More information about the TriLUG
mailing list