Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it echos "sent" but i dont get the email nor in the spam folder of my email
- <?php
- $to = "ab159ab@hotmail.com";
- // Windows may not handle this format well
- // $to = "Recipient Name <nobody@somedomain.com>";
- // multiple recipients
- // $to = "nobody@somedomain.com, somebody@somedomain.com";
- // $to = "Recipient Name <nobody@somedomain.com>, somebody@somedomain.com";
- $subject = "Mail Test at ".strftime("%T", time());
- $message = "This is a test.";
- // Optional: Wrap lines for old email programs
- // wrap at 70/72/75/78
- $message = wordwrap($message,70);
- $from = "Sender Name <somebody@somedomain.com>";
- $headers = "From: {$from}\n";
- $headers .= "Reply-To: {$from}\n";
- // $headers .= "Cc: {$to}\n";
- // $headers .= "Bcc: {$to}\n";
- $headers .= "X-Mailer: PHP/".phpversion()."\n";
- $headers .= "MIME-Version: 1.0\n";
- $headers .= "Content-Type: text/plain; charset=iso-8859-1";
- $result = mail($to, $subject, $message, $headers);
- echo $result ? 'Sent' : 'Error';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement