有关phpmailer的用法
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Freigeben: 2016-07-25 09:07:13
Original
1206 Leute haben es durchsucht
-
-
require("phpmailer/class.phpmailer.php");
- function smtp_mail( $sendto_email, $subject, $body, $extra_hdrs, $user_name){
- $mail = new PHPMailer();
- $mail->IsSMTP(); // send via SMTP
- $mail->Host = "200.162.244.66"; // SMTP servers
- $mail->SMTPAuth = true; // turn on SMTP authentication
- $mail->Username = "yourmail"; // SMTP username 注意:普通邮件认证不需要加 @域名
- $mail->Password = "mailPassword"; // SMTP password
- $mail->From = "yourmail@yourdomain.com"; // 发件人邮箱
- $mail->FromName = "管理员"; // 发件人
-
- $mail->CharSet = "GB2312"; // 这里指定字符集!
- $mail->Encoding = "base64";
- $mail->AddAddress($sendto_email,"username"); // 收件人邮箱和姓名
- $mail->AddReplyTo("yourmail@yourdomain.com","yourdomain.com");
- //$mail->WordWrap = 50; // set word wrap 换行字数
- //$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment 附件
- //$mail->AddAttachment("/tmp/image.jpg", "new.jpg");
- $mail->IsHTML(true); // send as HTML
- // 邮件主题
- $mail->Subject = $subject;
- // 邮件内容
- $mail->Body = "
-
-
-
-
-
- I love php
|
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Neueste Artikel des Autors
-
2025-02-26 03:58:14
-
2025-02-26 03:38:10
-
2025-02-26 03:17:10
-
2025-02-26 02:49:09
-
2025-02-26 01:08:13
-
2025-02-26 00:46:10
-
2025-02-25 23:42:08
-
2025-02-25 22:50:13
-
2025-02-25 21:54:11
-
2025-02-25 20:45:11