Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $email_to = 'myemail@gmail.com';
- $email_subject = "Test mail";
- $email_body = "Hello! This is a simple email message.";
- $from = "myemail@gmail.com";
- if(mail($email_to, $email_subject, $email_body)){
- echo "The email($email_subject) was successfully sent.";
- } else {
- echo "The email($email_subject) was NOT sent.";
- }
- ?>
- [mail function]
- ; For Win32 only.
- ; http://php.net/smtp
- SMTP = smtp.gmail.com
- ; http://php.net/smtp-port
- smtp_port = 587
- ; For Win32 only.
- ; http://php.net/sendmail-from
- sendmail_from = myemail@gmail.com
- ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
- ; http://php.net/sendmail-path
- sendmail_path = ""
Add Comment
Please, Sign In to add comment