Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'phpmail/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'mail.privateemail.com';
- $mail->SMTPAuth = true;
- $mail->Username = 'admin@yoursite.com';
- $mail->Password = 'YourPassword';
- $mail->SMTPSecure = 'ssl';
- $mail->Port = 465;
- $mail->setFrom('admin@yoursite.com', 'YourSite Admin');
- $mail->addAddress('rmcdermott927@gmail.com', 'rmcdermott927@gmail.com');
- $mail->addReplyTo('admin@yoursite.com', 'admin@yoursite.com');
- $mail->isHTML(true);
- $mail->Subject = 'Here is the subject';
- $mail->Body = 'This is the HTML message body <b>in bold!</b>';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement