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 <noreply@company.co.uk>' . "\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
Share on other sites

I dont own the server, It is being hosted with a company, and they use the eXtend control panel.  Whilst I prefere cPanel, I dont have a choice - and I cannot see anywhere in the eXtend control panel to view mail server logs.. :(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.