mail function from php

Hi there,

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:

<html>
<head>
<title>Correos</title>
</head>
<body>
<?php
$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

      for ($i=1;$i&lt;=5;$i++){
          mail($mail,'Test','5 mails to the same e-mail box', $headers);
          echo "Sending mail number $i &lt;br&gt; 

";
}
?>
</body>
</html>

Thanks for help

Best regards

agunet74

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

Thanks anyway

any other help will be very welcome! :wink:

agunet74

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.