Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("content-type:text/html;charset=utf-8");
- date_default_timezone_set("Etc/GMT-8");
- require_once"class.smtp.php";
- require_once"class.phpmailer.php";
- $mail = new PHPMailer;
- $mail->IsSMTP(); // send via SMTP
- $mail->Host = "smtpdm.aliyun.com"; // SMTP servers
- $mail->PORT = 465;
- $mail->SMTPDebug = 2;
- $mail->SMTPAuth = true;
- $mail->Username = "web@info.jingdaninternet.com"; // SMTP username
- $mail->Password = "Mypassord"; // SMTP password
- $mail->From = "web@info.jingdaninternet.com";
- $mail->FromName = "Test"; //
- $mail->CharSet = "UTF-8"; //
- $mail->Encoding = "base64";
- $mail->AddAddress("info@jingdaninternet.com","Receiver");
- $mail->IsHTML(true); // send as HTML
- $mail->Subject = "New Message";
- $mail->Body = "Test";
- if(!$mail->Send())
- {
- echo "Wrong!";
- exit;
- }
- else {
- echo "Success!";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement