Page 1 of 1
mail() problem
Posted: Mon Feb 28, 2005 3:33 pm
by dannymc1983
im trying to send a simple email using the mail() funtion but getting this error message every time:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in c:\wamp\www\Mail\sendmail.php on line 3
i have sendmail_from in php.ini set to my own email address. i only have php set up locally on my pc, would this make a difference.? if not what else could be the problem?
Posted: Mon Feb 28, 2005 3:43 pm
by feyd
if you don't have sendmail installed on your machine where php can find it.. it won't likely work..
Posted: Mon Feb 28, 2005 3:58 pm
by dannymc1983
isnt sendmail part of php?
in php.ini it says only need to specify the path when using unix. im using windows.
any other suggestions?
Posted: Mon Feb 28, 2005 4:08 pm
by Chris Corbyn
Yeah it's just the variable in the ini but I think feyd meant if it's not enabled.
Have you set up your smtp server since you're running on localhost unless you are hosting your own SMTP server. You'll need to set it up to the same as the one provided by your ISP otherwise. the bit in the ini that says
SMTP=*****
right near the sendmail_from part.
Also, depending upon the valoume of emails you are intending to send, alot of ISP's block you from sending so many in a set amount of time. Too many people wanting to spam people these days...

Posted: Mon Feb 28, 2005 4:14 pm
by dannymc1983
ok i think it might be because i might not be editing the right file, which sounds a bit stupid i know! i have apahce, php and mysql all installed under wamp. there is a php.ini file in c:\wapm and one in c:\windows. so which one do i edit?
Posted: Mon Feb 28, 2005 4:15 pm
by Chris Corbyn
It should be the one in C:\Windows unless otherwise specified but to diuble check just run
on your local machine and somewhere near the top it tells you the ini file it is using...