Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('class.phpmailer.php');
- $mail = new PHPMailer(); // defaults to using php "mail()"
- //$body = file_get_contents('contents.html');
- //$body = eregi_replace("[\]",'',$body);
- $body = "This is my body";
- $myaddress = "test@wpplugins.biz";
- $mail->AddReplyTo("test@wpplugins.biz","Newsletter plugin");
- $mail->SetFrom("test@wpplugins.biz","Newsletter plugin");
- $mail->AddReplyTo("test@wpplugins.biz","Newsletter plugin");
- $address = "AAAA3QcCBw4A@appmaildev.com";
- $mail->AddAddress($address);
- $mail -> Encoding = "8bit";
- $mail->Subject = "PHPMailer Test Subject";
- //$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
- $mail -> MsgHTML($body);
- $mail -> Body = $body;
- $mail -> DKIM_private = ".htkeyprivate";
- $mail -> DKIM_domain = "wpplugins.biz";
- $mail -> DKIM_selector = "newsletters";
- //$mail->AddAttachment("images/phpmailer.gif"); // attachment
- //$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
- if(!$mail->Send()) {
- echo "Mailer Error: " . $mail->ErrorInfo;
- } else {
- echo "Message sent!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement