Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('class.smtp.php');
- include "class.phpmailer.php";
- $nFrom = "Test";
- $mFrom = 'nhien@mail.1and0nly.jp';
- $mUser = 'nhien@mail.1and0nly.jp';
- $mPass = 'yourpass';
- $nTo = 'sample@gmail.com';
- $mTo = 'sample@gmail.com';
- $mail = new PHPMailer();
- $body = 'Test';
- $title = 'Mail';
- $mail->IsSMTP();
- $mail->CharSet = "utf-8";
- $mail->SMTPDebug = 1;
- $mail->SMTPAuth = true;
- #$mail->SMTPSecure = "tls";
- $mail->Host = "mail.1and0nly.jp";
- $mail->Port = 25;
- $mail->Username = $mUser;
- $mail->Password = $mPass;
- $mail->SetFrom($mFrom, $nFrom);
- #$mail->AddReplyTo('info@freetuts.net', 'Freetuts.net');
- $mail->Subject = $title;
- $mail->MsgHTML($body);
- $mail->AddAddress($mTo, $nTo);
- if(!$mail->Send()) {
- echo 'ERROR!';
- } else {
- echo 'SUCCESSFUL!. ';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement