phpmailer

SwiftMailer Connection could not be established with host smtp.mailgun.org [closed]

家住魔仙堡 提交于 2019-12-22 12:14:39
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . If i use $transport = Swift_SmtpTransport::newInstance('localhost', 25); then it's working fine but when i'm using this settings it's not working $transport = Swift_SmtpTransport::newInstance('smtp.mailgun.org', 465, 'ssl') ->setUsername('mailegun username') ->setPassword('mailgun password'); This problem is in

Adding embedded images within mail body phpmailer class

∥☆過路亽.° 提交于 2019-12-22 11:18:07
问题 Im trying to embed an image within my message body but it ends up as an attachment $mailer->Subject = APP_NAME . " - " . $name . " send you and Ad : " . $row['name']; $mailer->IsHTML(true); $mailer->AddEmbeddedImage('../images/namDiams.png', 'logoimg', 'namDimes.png'); //footer $footer = "Regards<br/><br/>"; $footer .= '<table style="width: 95%">'; $footer .= '<tr>'; $footer .= '<td>'; $footer .= "<strong><span style='font-size: 15px'>NamDimes Team</span></strong><br/> NamDimes<br/> Contact

Sending 2 emails with PHP mailer fails

本秂侑毒 提交于 2019-12-22 06:31:08
问题 I am rather puzzled with this one. //SMTP servers details $mail->IsSMTP(); $mail->Host = "mail.hostserver.com"; $mail->SMTPAuth = false; $mail->Username = $myEmail; // SMTP usr $mail->Password = "****"; // SMTP pass $mail->SMTPKeepAlive = true; $mail->From = $patrickEmail; $mail->FromName = "***"; $mail->AddAddress($email, $firstName . " " . $lastName); $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = $client_subject; $mail->Body = $client_msg; if($mail->Send()) { $mail-

SMTP ERROR: Failed to connect to server: Connection refused (111) ERROR MESSAGE

旧巷老猫 提交于 2019-12-22 05:29:08
问题 I'm new to PHPMailer , and I just downloaded it with Composer and coded this as index.php : <?php require_once 'vendor/autoload.php'; use PHPMailer\PHPMailer\PHPMailer; $m = new PHPMailer; $m->isSMTP(); $m->SMTPAuth = true; $m->SMTPDebug = 2; $m->Host = 'smtp.mail.yahoo.com'; $m->Username = 'vagefipooya@yahoo.com'; $m->Password = 'MY PASSWORD'; $m->SMTPSecure = 'ssl'; $m->Port = 465; $m->IsHTML(true); $m->SetFrom('pouyavey@gmail.com'); $m->FromName = 'Pouya Vaghefi'; $m->addReplyTo('pouyavey

SMTP configuration not working in production

ぐ巨炮叔叔 提交于 2019-12-22 02:00:19
问题 I'm trying to send an email when a form is submitted. I'm using PHPMailer to send the mail using the below configuration. $mail = new PHPMailer; $mail->isSMTP(); $mail->Host = 'mail.example.in'; $mail->Port = 25; $mail->SMTPAuth = true; $mail->Username = 'user@example.in'; $mail->Password = 'password'; $mail->setFrom("user@example.in" , "User"); $mail->addAddress('receiver@example.in', 'Receiver'); $mail->addBCC('anotheruser@somedomain.com', 'Another user'); $mail->AddReplyTo('user@example.in

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

与世无争的帅哥 提交于 2019-12-22 01:23:55
问题 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

Message body empty in PHPMailer can't figure what is wrong at all

安稳与你 提交于 2019-12-21 21:03:18
问题 I have been trying to figure out what is wrong but just can't point the finger on it. I am still very new to PHP so it may be a misspell or something really small that someone better experienced would see right away.I have a contact form on my website and I want people to be able to send me emails. Here's the code: <?php require_once 'libs/phpmailer/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->isSMTP(); $mail->SMTPAuth = true; $mail->SMTPDebug = 2; $mail->Mailer = "smtp"; $mail->Host

Warning: stream_socket_enable_crypto(): SSL operation failed with code 1

早过忘川 提交于 2019-12-21 10:49:57
问题 I have a problem with CSCart, it fails sending mail via google account. To check if there is a problem in server config or in CSCart's scripts I installed clean library PHPMailer and tried to send test message using example script. Result is the same: 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 [script path]/class.smtp.php on line 338 OpenSSL connection

Using SSL/TLS when sending an email from PHP

梦想与她 提交于 2019-12-21 05:37:07
问题 I am very new to email servers and sending email with PHP... Is it possible to have email sent from a PHP script on my server encrypted using SSL or TLS before it is sent to the recipient's mail server? I need to ensure only the intended recipient can read the email, in case the transmission is intercepted on its journey to their mail server. I am not sure if this is possible, as the recipient's mail server would not know the public key right? So how could it decrypt the email? As background,

Email through PHPMailer is slow

风格不统一 提交于 2019-12-21 05:36:19
问题 When I am sending via Gmail using phpmailer, the email is taking a long time to send and also sometimes it is not going. I am using XAMPP as localhost. Here is my Code: if($_POST['submit']{ /*MAIL PART BEGINS*/ //error_reporting(E_ALL); error_reporting(E_STRICT); date_default_timezone_set('America/Toronto'); require_once('class.phpmailer.php'); //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded $mail = new PHPMailer(); $body = "Your