Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('../../mailer/mailconfig.php');
- include('../../mailer/newmail.php');
- $from = 'me@example.com';
- $to = 'you@example.com';
- $cc = 'alsome@example.com';
- $subj = 'Test Email';
- $htmlMsg = 'Hello, <b>Tom</b>!';
- $plainMsg = 'Hello, Tom!';
- $mail->From = $from;
- $mail->FromName = "John";
- $mail->AddAddress($to);
- $mail->AddCC($cc);
- $mail->IsHTML(true);
- $mail->Body = $htmlMsg;
- $mail->AltBody = $plainMsg;
- $mail->Subject = $subj;
- $mail->WordWrap = 70;
- if($mail->Send())
- {
- $successMsg = "Your message was sent!";
- }
- else
- {
- $successMsg = "Your message was NOT sent!" . ' Mailer error: ' . $mail->ErrorInfo;
- }
- ?>
- <?php
- $mail = new PHPMailer();
- $mail->isSendMail(); // telling the class to use SMTP
- $mail->Host = "smtpexample.net"; // SMTP server
- ?>
Add Comment
Please, Sign In to add comment