Jump to content

PHP Mail Help


davich64

Recommended Posts

Hello, I have a PHP application wich generates monthly  reports and then can send the report to a specific email adress. My problem is that and specific report is not being send and i cannot find out why, all reports are send through the same dynamic php code.

 

The php code generates the message from mysql query and gets some psoted parameter to identify wich month to report. I want to know if could be making some strange mistake(all reports work except of an specific month) or the problem is my web server.

 

$month=$_POST[month];
$state2='abcd';

$to = $_POST[mail1];
$headers = "From: [email protected]\nReply-To: [email protected]\nContent-Type: text/html; charset=iso-8859-1";
$subject = "Report  $state2";

echo $to;

$msg = "some html code.."

mail("$to", "$subject", "$msg", "$headers");

echo "Success";

$url = "somepage.php";
echo '<meta http-equiv="refresh" content="1;URL=' . $url . '">'; 

Link to comment
https://forums.phpfreaks.com/topic/170914-php-mail-help/
Share on other sites

i would start by eliminating any possible culprits causing the problems. do you receive an email with just this code?

 

mail("[email][email protected][/email]", "debug output", "test");

 

edit: sorry, didnt read everything... you do have it working in most instances...

Link to comment
https://forums.phpfreaks.com/topic/170914-php-mail-help/#findComment-901466
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.