Web Hosting Talk







View Full Version : PHP Mail Scripting Question


mrkappa
11-05-2005, 12:45 PM
Hello All,

Ive been with the same host for many years and was always running CGI/PERL scripts from well reputed develepors. Ive started to purchase PHP programs and had the programmers install them and they all seemed to work except for the email function only.

My host gave me the following answer:
FROM HOST:
You are running your scripts as mod-php there is a high chance that you
are going to be caught by policyd which is running on the server in order
to limit the amount of exploited php mail being sent from our servers.
***Using mod-php your scripts will send as the apache user rather than your
user***. Change your php script to report the envelope sender and the
problems you are having should go away.

END OF MESSAGE

Does this make any sense at all? How would I do this at the script level.

Burhan
11-05-2005, 01:10 PM
Basically, what they are saying is send a From: header with your emails, so it doesn't appear as coming from Apache. There is an example on how to do this at the mail function manual entry.

mrkappa
11-05-2005, 02:42 PM
Basically, what they are saying is send a From: header with your emails, so it doesn't appear as coming from Apache. There is an example on how to do this at the mail function manual entry.

The script as a data config file with only this line item....

//mail addresses
$admin_mail="<A href="mailto:webmaster@mysitehere.com";//admin">webmaster@mysitehere.com";//admin e-mail
$system_mail="<A href="mailto:webmaster@mysite.com";//system">webmaster@mysite.com";//system messages e-mail

What should I change this to? Is this even where I'm supposed to be?

mrkappa
11-05-2005, 02:45 PM
hmm that pasted wierd

//mail addresses
$admin_mail= "webmaster@mysite.com "; //admin e-mail
$system_mail= "webmaster@mysitehere.com "; //system messages e-mail
(Threw in a few spaces so that it would paste correctly)

Dan Grossman
11-06-2005, 05:15 AM
No way to tell without seeing the rest of the script.

Burhan
11-06-2005, 06:03 AM
I'm not sure, I suggest you ask the person that wrote the script.