phpmailer

PHPMailer generates PHP Warning: stream_socket_enable_crypto(): Peer certificate did not match expected

柔情痞子 提交于 2019-11-26 09:27:59
问题 I am using PHPMailer on PHP 5.6, the increased security around certificated in PHP 5.6 is certainly fun. I am trying to send a test message to a domain hosted on dreamhost, the error that comes back from PHPMailer is: Could not connect to SMTP host. That error is not right though, I have logging enabled and here is what is actually going on. Connection: opening to mx1.sub4.homie.mail.dreamhost.com:25, timeout=30, options=array ( ) Connection: opened S: 220 homiemail-mx32.g.dreamhost.com ESMTP

PHPMailer AddAddress()

旧街凉风 提交于 2019-11-26 07:35:29
问题 I don\'t know how the data should be formatted for AddAddress PHPMailer function; I need the email to be sent to multiple recipients so I tried $to = \"me@domain.com,you@domain.net,she@domain.it\"; $obj->AddAddress($to); but with no success. Any help will be appreciated. 回答1: You need to call the AddAddress function once for each E-Mail address you want to send to. There are only two arguments for this function: recipient_email_address and recipient_name . The recipient name is optional and

Gmail SMTP debug: error “please log in via your web browser” [closed]

懵懂的女人 提交于 2019-11-26 06:05:55
I'm having problems with gmail smtp server. I already read many posts here in StackOverflow about that subject. The best post I found about test the connection is this one . Although it is very well explained the error I'm getting I couldn't find a answer: Google SMTP just says "Please log in via your web browser and then try again". I'm completely sure that the password and the email (both in base64) are well encoded. As you can see here, in this image: , there is just one difference I can notice: the user@gmail.com and password is sent in two steps. In the link above the guy sends both at

Could not instantiate mail function. Why this error occurring

喜夏-厌秋 提交于 2019-11-26 06:02:54
问题 When I\'m trying to send mail through PHPMailer, i\'m getting this error message. My code is below: <? require(\"phpmailer/class.phpmailer.php\"); // First we require the PHPMailer libary in our script $mail = new PHPMailer(); // Next we create a new object of the PHPMailer called $mail $mail->From = \"rajasekar.kcet@gmail.com\"; $mail->FromName = \"Rajasekar\"; $mail->AddAddress(\"rajasekar.kcet@gmail.com\"); // This is the adress to witch the email has to be send. $mail->Subject = \"First

PHPMailer - SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

拥有回忆 提交于 2019-11-26 05:56:25
问题 Have encountered an issue where email should be sent from an mail server which has self signed certificate, the error which I get is : PHP 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 class.smtp.php on line 327. Has anyone encountered anything similar? EDIT: I have also tried to set the stream_context params (params: SSL context options): $options[\'ssl\'][

How do I prevent mails sent through PHP mail() from going to spam?

扶醉桌前 提交于 2019-11-26 05:42:36
问题 I am using PHP\'s mail() function to send emails (sendmail process is running). But all the mails are going to spam (in case of gmail). I have tried many tricks that I found on the net but none is working, please tell me about any sure-shot trick. 回答1: You must to add a needle headers: Sample code : $headers = "From: myplace@example.com\r\n"; $headers .= "Reply-To: myplace2@example.com\r\n"; $headers .= "Return-Path: myplace@example.com\r\n"; $headers .= "CC: sombodyelse@example.com\r\n";

How do I prevent mails sent through PHP mail() from going to spam?

删除回忆录丶 提交于 2019-11-26 04:39:34
I am using PHP's mail() function to send emails (sendmail process is running). But all the mails are going to spam (in case of gmail). I have tried many tricks that I found on the net but none is working, please tell me about any sure-shot trick. You must to add a needle headers: Sample code : $headers = "From: myplace@example.com\r\n"; $headers .= "Reply-To: myplace2@example.com\r\n"; $headers .= "Return-Path: myplace@example.com\r\n"; $headers .= "CC: sombodyelse@example.com\r\n"; $headers .= "BCC: hidden@example.com\r\n"; if ( mail($to,$subject,$message,$headers) ) { echo "The email has

PhpMailer vs. SwiftMailer? [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 04:24:35
问题 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 5 years ago . I\'m building a fairly simple PHP script that will need to send some emails with attachments. I\'ve found these 2 libraries to do this. Does either one have significant advantages over the other? Or should I just pick one at random and be done with it? 回答1: I was going to say that PHPMailer is no longer

phpmailer error “Could not instantiate mail function”

眉间皱痕 提交于 2019-11-26 03:58:06
问题 I\'m using the mail() basic example modified slightly for my user id and I\'m getting the error \"Mailer Error: Could not instantiate mail function\" if I use the mail function - mail($to, $subject, $message, $headers); it works fine, though I\'m having trouble sending html, which is why I\'m trying PHPMailer. this is the code: <?php require_once(\'../class.phpmailer.php\'); $mail = new PHPMailer(); // defaults to using php \"mail()\" $body = file_get_contents(\'contents.html\'); $body =

PHPMailer: SMTP Error: Could not connect to SMTP host

隐身守侯 提交于 2019-11-26 03:24:36
问题 I\'ve used PHPMailer on several projects but now I\'m stuck. It gives me the error: SMTP Error: Could not connect to SMTP host. I\'ve tried sending email from Thunderbird and it works ! But not through PHPMailer ... Here are the settings from Thunderbird: Server name: mail.exampleserver.com Port: 587 Username: user@exampleserver.com Secure Authentication: No Connection Security: STARTTLS I\'ve compared these with the server at my last project where I used PHPMailer and they were: Server name: