Guest User

Untitled

a guest
Dec 14th, 2017
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2. ini_set('SMTP','smtp.mydomain.com');
  3. ini_set('smtp_port',25);
  4. $to = 'xyz@gmail.com';
  5. $subject = 'the subject';
  6. $message = 'hello';
  7. $headers = 'From: abc@gmail.com' . "rn" .
  8. 'Reply-To: abc@gmail.com' . "rn" .
  9. 'X-Mailer: PHP/' . phpversion();
  10.  
  11. if(mail($to, $subject, $message, $headers)){
  12. echo 'Successfully sent';
  13. }
  14. else {
  15. echo 'failed';
  16. }
  17. ?>
Add Comment
Please, Sign In to add comment