Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sent mail from my site to members appears as spam
- $headers = "From: info@mysite.comrn";
- $headers .= "Reply-To: info@mysite.comrn";
- if ( mail("myemail@gmail.com","Test","Hello,world !",$headers) ) {
- echo "The email has been sent!";
- } else {
- echo "The email has failed!";
- }
- $to = "emailaddress@tosendto.com";
- $subject = "Put Subject Here";
- $message = "Put at least a paragraph of text";
- $headers = "MIME-Version: 1.0n";
- $headers .= "Content-type: text/htmlrn";
- $headers .= "X-Mailer: PHP/" . phpversion() . "rn";
- $headers .= "From: info@mysite.comrn";
- $headers .= "Reply-To: info@mysite.comrn";
- if ( mail($to,$subject,$message,$headers) ) {
- echo "The email has been sent!";
- } else {
- echo "The email has failed!";
- }
Add Comment
Please, Sign In to add comment