OK, well I’m just learning php, and wanted to just write a simple mail script, so I found the mail function. So in my php file I have:
<?php mail(“my email address”, “testing”, “Testing 123”, “From: my email address”);?>
Obviously my email address is replaced by my actual email address.
When I run this I get:
Warning: mail(): “sendmail_from” not set in php.ini or custom “From:” header missing in phpfilepath on line 10
where phpfilepath is the actual path to my php file. First off I figured only having the from paramater would work and I wouldn’t need to touch the php.ini file, but just for fun I went in and changed it to this
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
sendmail_from = my email address
; For Unix only. You may supply arguments as well (default: “sendmail -t -i”).
;sendmail_path =
So I satisfied both criteria when I should have only needed one, yet I got the same error again. Can anyone see what I’m doing wrong?