Email not getting through

the mail() function

Moderators: macek, egami, gesf

Post Reply
User avatar
New php-forum User
New php-forum User
Posts: 137
Joined: Wed Aug 31, 2011 3:55 am
Location: USA

Re: Email not getting through

Post by bigjoe11a » Sun Jan 29, 2012 1:31 pm

1st check your junk folder. Make sure that your filtered list includes the domain name from and to the email that your sending.

or if that doesn't work. Try using this. Just change the email names to the ones you want to use. Your sample above doesn't include any header information

Code: Select all

// recipients email address
$to  = ''; // note the comma

// subject
$subject = 'Subject of the message';

// message
$message = 'Type in the body of your message here';

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: Mary <>' . "\r\n";
$headers .= 'From: My Name <>' . "\r\n";
$headers .= 'Cc:' . "\r\n";
$headers .= 'Bcc:' . "\r\n";

// Mail it
mail($to, $subject, $message, $headers);

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest