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 = "[email protected]";
- // Windows may not handle this format well
- // $to = "Recipient Name <[email protected]>";
- // multiple recipients
- // $to = "[email protected], [email protected]";
- // $to = "Recipient Name <[email protected]>, [email protected]";
- $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 <[email protected]>";
- $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