Jump to content

Send Mail?!?


Chud37

Recommended Posts

Hello,

 

I have been using the mail() command for a while now, but for some reason It has just stopped functioning all together.  I have added an OR DIE rule to the end of it and had no response.  To all intents and purposes that mail is being sent - there are no errors whatsoever - just the mail is not getting delivered.  I cannot think of anything I've done or changed that would stop it from being delivered, I haven't even been near the function that does it in a while.  Here is the code:

 

	
function sendMail($to,$ref) {
        $subject = 'Booking Confirmation';
$file = "receipts/$ref.htm";
$fh=fopen($file, "r"); 
$message = fread($fh, filesize($file));
fclose($fh);
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Company <[email protected]>' . "\r\n";
mail($to, $subject, $message, $headers);
}

 

I have taken out the public names involved, but otherwise thats the code.  It has worked absolutely fine in the past, and even If I strip out all of the filehandling part of it, and just use a simple $from - $to - $message, it still seems not actually send the mail.  It wouldnt be so bad If I at least had an error to go on, but I dont :( I am just simply not getting the mail.

 

Please help!

 

~Chud37

 

Link to comment
https://forums.phpfreaks.com/topic/258031-send-mail/
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.