phpmailer

phpmailer not sending email to gmail,yahoo,hotmail or these are blocking email sent by phpmailer

夙愿已清 提交于 2019-12-04 20:37:56
i am using PHPmailer to send emails here is code that i have used: $mail = new PHPMailer(); $subject = "test"; $to = "test_patel@yahoo.com" $mail->SetFrom("PDSociety@aol.com","Punjab Dental Society"); $mail->AddReplyTo("PDSociety@aol.com", "Punjab Dental Society"); $mail->Subject = $subject; $mail->MsgHTML($str); $mail->AddAddress($to, "Punjab Dental Society"); if(!$mail->Send()) { $err = "Mailer Error: " . $mail->ErrorInfo; //echo $err; } else { $msg = "Message sent!"; } // Clear all addresses and attachments for next loop $mail->ClearAddresses(); if i change email address from yahoo to gmail

Phpmailer use dkim

不想你离开。 提交于 2019-12-04 19:45:26
Hi guys i've already configure my centos 6.5 (plesk) with postfix and dkim milter and if i send mail from webmail in my case roundcube dkim pass but if i try to send some email with phpmailer last version fail. i've read there http://dkim.worxware.com/ that is not necessary do another operations but not work anyway so i try to use tools in the bottom of page to create private and public keys and set another txt record i've already tried to add params like these: $mail->DKIM_domain = 'dominio.it'; $mail->DKIM_private = 'class/.htkeyprivate'; $mail->DKIM_selector = 'phpmailer'; $mail->DKIM

Send html emails using PHPMailer and html templates

ⅰ亾dé卋堺 提交于 2019-12-04 19:35:41
I'm trying to get the emails sent from my contact (using PHPMailer) sent in a nice html template (phtml actually). What works: I receive the html template so no issue with the transmission What does not work: The variables (message, phone number, etc) are not reflected in the body of my html template. I have tried several things in the html template, without success: <?= htmlspecialchars($message) ?> and #message# and <?php echo$_POST['message'] ?> What is the issue? Thanks, Here is the PHPMailer code: <?php require 'PHPMailer/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->CharSet =

PHP Mailer - SMTP GMAIL AUTHENTICATION

落花浮王杯 提交于 2019-12-04 17:23:38
I have problem with the PHP MAILER function. I am using GMAIL SMTP Authentication for sending email and also its working perfectly but i want to set "From" email like "myid@domainname.com" but it doesn't working properly. I used below code to set "From" email $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "mail.gmail.com"; // SMTP server $mail->SMTPDebug = 0; // enables SMTP debug information (for testing) $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // sets the prefix to the servier $mail->Host = "smtp.gmail.com"; /

Send FPDF document with PHPMailer;

早过忘川 提交于 2019-12-04 13:36:22
问题 I am currently trying to generate a pdf with FPDF and then send it in an email with PHPMailer. I know that the PHPMailer functionality is working, and I can create the pdf. But when i try to download the pdf to the server first, output($pdf,"F"), I get the error: Warning (2): fopen(/temp-file.pdf): failed to open stream: Permission denied [APP/Vendor/fpdf/fpdf.php, line 1025]FPDF error: Unable to create output file: /temp-file.pdf The pdf creation is very long, so i will just show you me

Failed to connect to server: Connection refused (111)

拥有回忆 提交于 2019-12-04 13:35:03
I am using PHPMailer to send the smtp emails. If I use the same setting in a WordPress site, it works fine. But my priority is to use in a custom php page. And there, it is giving the following errors SMTP ERROR: Failed to connect to server: Connection refused (111) SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting My Code is here below <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); require 'emails/PHPMailer

How to use TCPDF with PHP mail function

♀尐吖头ヾ 提交于 2019-12-04 13:17:23
问题 $to = 'my@email.ca'; $subject = 'Receipt'; $repEmail = 'rep@sales.ca'; $fileName = 'receipt.pdf'; $fileatt = $pdf->Output($fileName, 'E'); $attachment = chunk_split($fileatt); $eol = PHP_EOL; $separator = md5(time()); $headers = 'From: Sender <'.$repEmail.'>'.$eol; $headers .= 'MIME-Version: 1.0' .$eol; $headers .= "Content-Type: multipart/mixed; boundary=\"".$separator."\""; $message = "--".$separator.$eol; $message .= "Content-Transfer-Encoding: 7bit".$eol.$eol; $message .= "This is a MIME

PHPmailer sends to junk email

耗尽温柔 提交于 2019-12-04 12:08:02
I've just updated a contact form to use PHPMailer to stop emails being marked as junk, with no luck. It's a fairly straight forward setup I'm using but its still going into peoples junk mail. Here is my script, I was wondering if anyone could tell what was wrong? include_once('../inc/phpmailer/class.phpmailer.php'); $mail = new PHPMailer(); $name = $_POST['name']; $email = $_POST['email']; $body = "Name: ".$name."\r\n"; $body .= "Email: ".$email."\r\n"; $body .= "Message: ".$_POST['message']; $mail->From = "mailer@blah.com"; $mail->FromName = "Contact BLah"; $mail->Subject = "Contact From:

将PHPMailer整合到ThinkPHP 3.2 中实现SMTP发送邮件

与世无争的帅哥 提交于 2019-12-04 07:45:50
将PHPMailer整合到ThinkPHP 3.2 中实现SMTP发送邮件 ThinkPHP没有邮件发送的功能,于是,我就想了想,就将PHPMailer整合到ThinkPHP中吧。 PHPMailer是不符合ThinkPHP规范的插件程序,所以,我们需要先将PHPMailer程序放到ThinkPHP的 Library/Vendor目录下,我这里是最新版的ThinkPHP 3.2,如果是是ThinkPHP 3.2之前的版本,可能就是Lib目录了。Vendor目录专门用于存放非标准ThinkPHP插件的目录,如下: PHPMailer整合到ThinkPHP中的存放目录 接下来为了方便发送邮件,我们可以定义一个专门发送邮件的函数sendMail(),这个函数可以只接受邮件发送的最基本的参数,发送到哪个邮 箱$id,邮件的主题$subject,邮件的内容$content。不过为了方便我们修改SMTP邮件发送服务器,我们先在config.php文件中 定义好邮件发送服务器,内容如下: config.php <?php return array ( // 配置邮件发送服务器 'MAIL_SMTP' =>TRUE, 'MAIL_HOST' => '邮件发送SMTP服务器' , 'MAIL_SMTPAUTH' =>TRUE, 'MAIL_USERNAME' => 'SMTP服务器登陆用户名' ,

All E-mails goes to spam folder of GMail, Hotmail and other email providers using phpmailer

两盒软妹~` 提交于 2019-12-04 07:08:21
问题 Recently I have a problem on sending e-mail with PHP Mailer function. Every mail which I sent from my script is straight way goes to spam folder on GMail, HotMail and other mail providers. I have configured everythig with my domain name, password etc… Here is my PHP code: $message = " <html> <head> <title>Activation</title> </head> <body> <p>Hello moorthi , </p> <p>Thank you for Using My Mail Service <b><a href='http://www.mobilebeez.co.in/'>mobileBeez </a></b></p><br/> <p><b>mobileBeez