PHPmailer下载与说明以及样例
来源:互联网 发布:仙界网络直播间 编辑:程序博客网 时间:2024/04/30 21:14
https://github.com/Synchro/PHPMailer# 下载地址
http://phpmailer.worxware.com/index.php?pg=methods 方法说明
Updated for PHPMailer v5.0.0
string $value Method provides ability for user to create own custom pseudo-properties (like X-Headers, for example). Example use:
$mail->set('X-MSMail-Priority', 'Normal');addCustomHeader($value)string $value Method provides ability for user to create own custom headers (like X-Priority, for example). Example use:
$mail->addCustomHeader("X-Priority: 3");MsgHTML($message) Evaluates the message and returns modifications for inline images and backgrounds. Sets the IsHTML() method to true, initializes AltBody() to either a text version of the message or default text.IsMail()booleantrueSets Mailer to send message using PHP mail() function. (true, false or blank)IsSMTP()boolean Sets Mailer to send message using SMTP. If set to true, other options are also available. (true, false or blank)IsSendmail()boolean Sets Mailer to send message using the Sendmail program. (true, false or blank)IsQmail()boolean Sets Mailer to send message using the qmail MTA. (true, false or blank)SetFrom($address, $name = "")string $address
string $name Adds a "From" address.AddAddress($address, $name = "")string $address
string $name Adds a "To" address.AddCC($address, $name = "")string $address
string $name Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.AddBCC($address, $name = "")string $address
string $name Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.AddReplyTo($address, $name = "")string $address
string $name Adds a "Reply-to" address.Send() Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error. Returns true on success, false on failure.AddAttachment($path, $name = "", $encoding = "base64",
$type = "application/octet-stream")string $path
string $name
string $encoding
string $type Adds an attachment from a path on the filesystem. Returns false if the file could not be found or accessed.AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64",
$type = "application/octet-stream")string $path
string $cid
string $name
string $encoding
string $type Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif". If you use the MsgHTML() method, there is no need to use AddEmbeddedImage() method.ClearAddresses() Clears all recipients assigned in the TO array. Returns void.ClearCCs() Clears all recipients assigned in the CC array. Returns void.ClearBCCs() Clears all recipients assigned in the BCC array. Returns void.ClearReplyTos() Clears all recipients assigned in the ReplyTo array. Returns void.ClearAllRecipients() Clears all recipients assigned in the TO, CC and BCC array. Returns void.ClearAttachments() Clears all previously set filesystem, string, and binary attachments. Returns void.ClearCustomHeaders() Clears all custom headers. Returns void.
http://phpmailer.worxware.com/index.php?pg=properties 属性说明
Updated for PHPMailer v5.0.0
来源:http://www.cnblogs.com/Liangw/archive/2013/01/30/2882579.html
利用PHPMailer 来完成PHP的邮件发送
<?phprequire 'PHPMailerAutoload.php';$mail = new PHPMailer;//$mail->SMTPDebug = 3; // Enable verbose debug output$mail->isSMTP(); // Set mailer to use SMTP$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers$mail->SMTPAuth = true; // Enable SMTP authentication$mail->Username = 'user@example.com'; // SMTP username$mail->Password = 'secret'; // SMTP password$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted$mail->Port = 587; // TCP port to connect to$mail->From = 'from@example.com';$mail->FromName = 'Mailer';$mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient$mail->addAddress('ellen@example.com'); // Name is optional$mail->addReplyTo('info@example.com', 'Information');$mail->addCC('cc@example.com');$mail->addBCC('bcc@example.com');$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name$mail->isHTML(true); // Set email format to HTML$mail->Subject = 'Here is the subject';$mail->Body = 'This is the HTML message body <b>in bold!</b>';$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo;} else { echo 'Message has been sent';}
0 0
- PHPmailer下载与说明以及样例
- phpMailer中文说明
- PHPMailer中文说明
- phpmailer中文说明
- PHPMailer中文说明
- phpmailer--中文说明
- phpMailer中文说明(收藏一下)
- LoadRunner11下载以及详细破解说明
- LoadRunner11下载以及详细破解说明
- LoadRunner11下载以及详细破解说明
- LoadRunner11下载以及详细破解说明
- LoadRunner11下载以及详细破解说明
- 邮件技术收集:phpMailer中文说明[收藏]
- 【PHP】PHPMailer发邮件详细说明
- PHPMailer
- PHPMailer
- phpmailer
- phpmailer
- 如何在linux(CentOS)下安装配置hadoop
- hdu2970 Suffix reconstruction 后缀数组反过来构造串
- 网页播放flv视频
- 几种序列化协议(protobuf,xstream,jackjson,jdk,hessian)相关数据对比
- 使用LayoutInflater.inflate获得布局文件对象,getLayoutParams 返回null
- PHPmailer下载与说明以及样例
- Dev 控件中的combox禁止输入
- 从一个简单的时间片轮转多道程序内核代码看操作系统如何运行
- URAL 1826. Minefield(数学 递归)
- 复习内联函数
- 8 基于框架XUtils下的多线程断点下载
- JNI/NDK开发指南(九)——JNI调用性能测试及优化
- 【C++11】新特性——decltype
- 7z用法