phpmailer

PHPMailer on godaddy server, setup correctly?

一世执手 提交于 2019-11-28 04:30:10
问题 I've just signed up for a godaddy server to test a PHP script I'm writing. I'm using PHPMailer to send a emails, it uses the godaddy email Host : relay-hosting.secureserver.net The problem is that I would like to mark the email as from "me"@gmail.com When I've sent emails using my gmail address in the AddReplyTo field the recipient email account sends it straight to the Junk folder. I know there is a fundamental problem here, that I'm sending conflicting headers and this is probably why it

PHPMailer character encoding issues

柔情痞子 提交于 2019-11-28 02:45:10
I try to use PHPMailer to send registration, activation. etc mail to users: require("class.phpmailer.php"); $mail -> charSet = "UTF-8"; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "smtp.mydomain.org"; $mail->From = "name@mydomain.org"; $mail->SMTPAuth = true; $mail->Username ="username"; $mail->Password="passw"; //$mail->FromName = $header; $mail->FromName = mb_convert_encoding($header, "UTF-8", "auto"); $mail->AddAddress($emladd); $mail->AddAddress("mytest@gmail.com"); $mail->AddBCC('mytest2@mydomain.org', 'firstadd'); $mail->Subject = $sub; $mail->Body = $message; $mail->WordWrap

Cannot connect to GMail SMTP (PHPMailer) - Certificate Verify Failed

僤鯓⒐⒋嵵緔 提交于 2019-11-28 02:27:39
Very recently encountered this error when trying to send mail via SMTP and GMail. Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in C:\xampp\htdocs\portal\libraries\php_mailer\class.smtp.php on line 343 2017-12-05 09:48:03 SMTP Error: Could not connect to SMTP host. 2017-12-05 09:48:03 CLIENT -> SERVER: QUIT 2017-12-05 09:48:03 SMTP ERROR: QUIT command failed: Server address is https://gg-portal.com , and SSL configuration seems correct (verified through online

PHPMailer cannot send email

别说谁变了你拦得住时间么 提交于 2019-11-28 02:27:10
My project contains a function to send email, being PHPMailer . It runs well to send email from my localhost server, but it stopped sending email today, and now it shows this error message SMTP Error: Could not connect to SMTP host. I added this code $mail->SMTPDebug = 1; to view debug errors and is now showing me this message: SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: The requested name is valid, but no data of the requested type was found. (0) SMTP Error: Could not connect to SMTP host I already have enabled extension=php_openssl.dll in php.ini .

PHPMailer Mailer Error: Message body empty

主宰稳场 提交于 2019-11-28 01:59:25
问题 I'm trying to get the basic example working for PHPMailer. All I done was upload the whole PHPMailer_5.2.2 folder, configured the page below as per the code you see and I keep getting Mailer Error: Message body empty , but I can clearly see the contents.html file has html in it and isn't empty. This is the example file I'm using from the PHPMailer PHPMailer_5.2.2/examples/test_smtp_gmail_basic.php I tried using the settings I have in Outlook for Gmail that works, I know my username and

How to change envelope sender address using phpmailer?

你。 提交于 2019-11-28 01:08:45
问题 With php mail() I can write mail('to@example.com','subject!','body','From: from@example.com','-f from@example.com'); But how can I do the same with phpmailer ? 回答1: This example shows how. the relevant lines: $mail->SetFrom('name@yourdomain.com', 'First Last'); $mail->AddReplyTo('name@yourdomain.com', 'First Last'); 回答2: The relevant line in Theolodis answer is: $mail->SetFrom('name@yourdomain.com', 'First Last'); There is no need to use AddReplyTo() this is something completely different.

How can I send HTML mails with included CSS with PHPMailer?

浪尽此生 提交于 2019-11-28 01:01:14
问题 I've problem with sending HTML mails with PHPMailer. I make a Smarty template and I got all the HTML code from it. But when I send mail, I got the mail without included CSS (it's only background-color, font or something like that). In PHPMailer I set that the mail is HTML. Is there any way to send HTML mail with included CSS? 回答1: There's is a way... $body = <<< YOUR_HTML_WITH_CSS_STYLE_TAGS <html> <head> <style> body * {width:1px;} #adiv {padding:2px;} .aclass {margin:3px;} </style> </head>

TP5实现邮件发送(PHP 利用QQ邮箱发送邮件「PHPMailer」)

百般思念 提交于 2019-11-28 00:03:05
修改php.ini中的一些配置 extension=php_openssl.dll //前面的分号去掉, allow_url_fopen = Off 改为 allow_url_fopen = On PHPMailer PHPMailer 是一个封装好的 PHP 邮件发送类,支持发送 HTML 内容的电子邮件,以及可以添加附件发送,并不像 PHP 本身 mail() 函数需要服务器环境支持,您只需要设置邮件服务器以相关信息就能实现邮件发送功能。 PHPMailer 项目地址 : https://github.com/PHPMailer/PHPMailer PHP扩展支持 PHPMailer 需要 PHP 的 sockets 扩展支持,而登录 QQ 邮箱 SMTP 服务器则必须通过 SSL 加密,故 PHP 还得包含 openssl 的支持。 ↑ 使用 phpinfo() 函数查看 socket 和 openssl 扩展信息(wamp server 默认启用了该扩展)。 整理后的PHPMailer 核心文件 我们需要下载的phpmailer文件: 链接:https://pan.baidu.com/s/1fNF7HHnk-RxVyPupxTdGOQ 提取码:9b95 将下载的压缩包解压到当前TP5框架下的extend文件夹中 QQ 邮箱中的 设置 选择账户 所有的主流邮箱都支持 SMTP

phpMailer attachment

守給你的承諾、 提交于 2019-11-27 23:23:01
I'm using this to attach files to an mail after uploading them to my server: for ($i = 0; $i <= 2; $i++) { $mail->AddAttachment($locatie.$_FILES['uploaded'.$i]['name'], $_FILES['uploaded'.$i]['name']); } Adding attachments is optional, but when the are no files uploaded it gives an error: Could not access file How can I prevent this error of showing? See here how to deal with file uploads first: Handling file uploads You need to refer to the temporary filename. That's needed to get the actual filename, not only the name of the file. $_FILES['userfile']['tmp_name'] So access $_FILES['userfile']

PHPMailer - mails going straight to spam

こ雲淡風輕ζ 提交于 2019-11-27 20:20:09
Whenever I send an automated e-mail using PHPMailer, it goes straight into the spam folder in Gmail. I have tried finding a solution to this myself but I don't know enough about e-mails and e-mail headers. Can anyone explain why this is happening? PHP Code is below, followed by the headers that show up from the receiver. Thanks! $mail = new PHPMailer; $mail->From = "chrisxenongroup@server.xenonacademy.org.uk"; $mail->FromName = 'Xenon Group Academy'; $mail->AddAddress($email); $mail->Subject = "Your Xenon Group Academy login details"; $mail->IsHTML(true); $mail->Body = "<html><body><h3>Welcome