草庐IT

PHPMailer

全部标签

windows - 在 Windows 上使用 PHP 通过中继发送邮件

我正在使用PHPMailer(通过SMTP)通过我的网站发送电子邮件。我正在使用Windows2012服务器作为使用Hmailserver的邮件服务器。我正在使用Mailgun转发我的电子邮件。我做过的事情:我已经设置并验证了我的mailgun设置。我已经测试了通过服务器发送和接收电子邮件,没有中继(工作正常)。我的困境:在某个阶段,我将不得不声明中继信息,例如身份验证或主机名。到目前为止,我看到两个可以声明的地方-见下文:1)通过PHPMailer脚本指定:$mail->IsSMTP();$mail->host="smtp.mailgun.org";$mail->Username="

php - 如何在 Bluehost 上使用 phpMailer isSMTP?

我花了好几天时间才获得正确的设置,所以我想我应该发布一个适用于Bluehost的php脚本。在初始测试中,使用isSMTP比使用isMAIL更快。IsSMTP();//setmailertouseSMTP$mail->Host="box1311.bluehost.com";//specifybluehostasoutgoingserver$mail->SMTPSecure="tls";//setstheprefixtotheserverdonotusessl$mail->SMTPDebug=3;//commentoutifyoudon'tneeddebuginfo$mail->SMTP

phpmailer 不发送电子邮件

我正在使用phpmailer,但出现以下错误:消息未发送邮件程序错误:SMTP错误:无法连接到SMTP主机。IsSMTP();$mailer->Host='ssl://smtp.myhost.com:465';$mailer->SMTPAuth=TRUE;$mailer->Username='myemail@myhost.com';$mailer->Password='mypass';$mailer->From='myemailagain@myhost.com';$mailer->FromName='myname';$email1=$_GET['email'];$verificatio

PHPMailer SMTP 连接失败

我正在尝试使用PHPMailer通过Mandrill发送电子邮件但没有成功(在本地主机上测试)。谁能告诉我问题出在哪里?这是来自PHPMailer的详细信息:2014-04-2717:51:06SERVER->CLIENT:220smtp.mandrillapp.comESMTP2014-04-2717:51:06CLIENT->SERVER:EHLO127.0.0.12014-04-2717:51:06SERVER->CLIENT:250-ip-10-107-129-238250-PIPELINING250-SIZE26214400250-STARTTLS250-AUTHPLAINL

PHPMailer 发送重复的电子邮件

PHPMailerIsSMTP();$mail->IsHTML(true);$mail->SMTPSecure="tls";$mail->Mailer="smtp";$mail->Host="smtp.office365.com";$mail->Port=587;$mail->SMTPAuth=true;//turnonSMTPauthentication$mail->Username="xxx";$mail->Password="xxx";$mail->setFrom('xxx','Website');//SendtoAdmin$AdminEmail='admin.example@g

PHP Mailer 错误 : Message could not be sent. Mailer Error: SMTP connect() failed

这是我的代码:require'phpmailertesting/PHPMailerAutoload.php';$mail=newPHPMailer;//$mail->SMTPDebug=3;//Enableverbosedebugoutput$mail->isSMTP();//SetmailertouseSMTP$mail->Host='send.one.com';//SpecifymainandbackupSMTPservers$mail->SMTPAuth=true;//EnableSMTPauthentication$mail->Username='myemailhidden';

php - 在电子邮件主题中包含 html 标签 [PHP]

使用标题,html标签将在邮件内容/正文中被解析,但是如果我们想在邮件主题中有一些html标签怎么办。这有什么办法吗 最佳答案 即使您在邮件主题中放置html标签,邮件客户端也不会将其呈现为html根据电子邮件RFC,电子邮件主题不能有内容类型来自rfchttp://www.w3.org/Protocols/rfc822/3.1.2.STRUCTUREOFHEADERFIELDSOnceafieldhasbeenunfolded,itmaybeviewedasbeingcomposedofafield-namefollowedbya

javascript - 用于 phpmailer 的 php 表单提交使用 jquery ajax 发送邮件

我在这里阅读了很多答案并尝试了几乎所有答案,但没有一个对我有帮助问题是我想将联系人从数据发送到将发送邮件的phpmailer。我想用jqueryajax来做。电子邮件运行良好,但问题是我的表单重定向到“操作”。我试过preventDefault();并返回假;但这对我没有帮助。我想在成功提交表单后向用户显示消息。这是我使用Bootstrap的表单代码我的jqueryajax代码$(document).ready(function(){$("#singlebutton").click(function(event){/*stopformfromsubmittingnormally*/ev

php - 如何使用 phpmailer 并从 ckeditor 以 html 格式发送邮件

我正在使用phpmailer发送电子邮件,在表单ckeditor上插入html代码的内容时遇到问题,但数据仅发送到电子邮件文本。这是我的代码:require_once('class.phpmailer.php');$mail=newPHPMailer(true);if(isset($_POST['btn_send'])){$smtp_username=strip_tags($_POST['username']);$smtp_password=strip_tags($_POST['password']);$ssl_port=strip_tags($_POST['port']);$my_s

PHPMailer SMTP 本地主机,证书错误

我们使用PHPMailer。服务器配置为使用本地SMTP。所以,一般的PHPMailer突击队看起来像这样:$mail=newPHPMailer();$mail->From='info@localdomain.com';$mail->Host='localhost';$mail->IsSMTP();...从PHP5.6开始,这不再有效,因为证书不匹配。我们收到以下错误:Warning:stream_socket_enable_crypto():PeercertificateCN='*.thisvps.com'didnotmatchexpectedCN='localhost'in/ho.