- include("class.phpmailer.php");
- $mail = new PHPMailer();
- $mail->From = 'your email address@.com';
- $mail->FromName = 'HTML Blog';
- $mail->Host = 'host name';
- $mail->Mailer = 'smtp';
- $mail->Subject = 'subject';
- $mail->IsHTML(true);
- $body = 'Hello
How are you ?';
- $textBody = 'Hello, how are you ?';
- $mail->Body = $body;
- $mail->AltBody = $textBody;
- $mail->AddAddress('reciepents full email address');
- if(!$mail->Send())
- echo 'There has been a mail error !';
-
复制代码
|