I’m trying to use the mail function from php. At this point I am sending them (the mails) to my e-mail accounts.
I run the program but nothing happens. Any suggestion ? IS apache has something to do with this ?
I copy-paste my simple program of mail:
$headers = ‘MIME-Version: 1.0’ . "
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . "
$mail = “@.”; //I don’t write for spam reasons, but the mail account is right
mail($mail,'Test','5 mails to the same e-mail box', $headers);
echo "Sending mail number $i <br>
Thanks for help
See here: PHP mail() Function which says about the headers argument:
Note: When sending an email, it must contain a From header. This can be set with this parameter or in the php.ini file.al.
I copy those headers arguments, add the from to php ini and still not working.
in the program if I write it in the headers variable, like this:
headers = “@.*” . "
heraders .= "charset… and other sutff I copied literall
I don’t know… bou it’s not working
any other help will be very welcome!
Here’s a call from a webapp I wrote:
mail($to, $subject, $message, 'From: ’ . REPLY_TO . "
" . 'Reply-To: ’ . DO_NOT_REPLY . "
" . ‘Content-type: text/plain; charset=“utf-8”’);
REPLY_TO and DO_NOT_REPLY are constants in my webapp, set to the appropriate mail addresses for the webapp.