View Full Version : mail() function not working...
01-25-2004, 02:11 PM
mail("$mailto", "the subject", $message,"Wrom: CUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJV
The error I get is:
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing.
Why is this...? And what should I do??
01-25-2004, 02:32 PM
mail("$mailto", "the subject", $message,"From: Email name <email@example.com>");
01-25-2004, 02:39 PM
Can't is use a variable in the Wrom: IPBARHDMNNSKVF
Also is it completely necessary to enclose vars in double quotes("..."),coz they anyway get expanded,can't I just use:
01-25-2004, 02:43 PM
No, don't need to use double quotes and you can use variables. I was just pointing out what was wrong
01-25-2004, 02:46 PM
Yes,I see...but the probem persists...I still get the same error message,should I look at php.ini for a possible solution...?
01-25-2004, 11:28 PM
have you edited the pp.ini file and changed the SMTP settings ?
open php.ini with notepad .. search for SMTP
set your hostname ( usually mail.yourdomain.com )
& email address
& if you are using linux / uinx etc etc you must define the path
to your sendmail daemon
im using a windows based ( local ) webserver but my email is handled via a linux box so i have the following
; For Win32 only.
SMTP = mail.mydomain.com
; For Win32 only.
sendmail_from = firstname.lastname@example.org
; For Unix only. You may supply arguments as well (default: 'sendmail -t -i').
;sendmail_path = /etc/local/sendmail
hope that helps :)
01-26-2004, 04:45 PM
Thanks,it does,but can't I leave the sendmail_from commented out and specify it in the mail()'s "From:" argument...??
01-26-2004, 05:04 PM
i think so .. give it a try .. havent tried it myself.
as long as you specify $from in your script it should work but no promising
good luck :)
01-26-2004, 08:26 PM
Thx alot dude!
01-26-2004, 11:19 PM
no problem :)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.