phpmailer

Unable to connect to SMTP server

穿精又带淫゛_ 提交于 2019-12-04 06:37:50
问题 I have a server with mail support, say example.com . I configured the server and added MX records via cpanel, so that I can receive and send mails via outlook.com with address myaddr@example.com . The MX records are got from domains.live.com . Now I need to send mail programmatically using PHP using SMTP. I tried PHPmailer using the following script. But it is showing the error Mailer Error: SMTP Connect() failed. (But I can send and receive emails via outlook.com using myaddr@example.com)

Godaddy phpmailer smpt configuration

。_饼干妹妹 提交于 2019-12-04 06:26:07
问题 We have a site on godaddy server. We have a contact form. When user filled form, first we should send mail to our info@oursite, after we should send mail to user's mail from our info@oursite. My tried code below: $name = $_POST['name']; $email = $_POST['email']; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 2; $mail->port = 25; $mail->Host = 'localhost'; $mail->Username = 'username@example.com'; $mail->Password = 'password'; $mail->addAddress($email, $name); $mail->subject =

Attachments not sent using php mail() function

China☆狼群 提交于 2019-12-04 06:22:48
问题 I'm working on file attachment here. The mail function is working fine other than the file field is empty. I have tried using Content-Type: multipart/mixed and some other methods but unable to achieve the desired output. I have searched for a different answer and tried but am still facing the same issue. There seems to be a duplicate but I had tried all methods can anyone guide me the right direction as per my script what i missing here. How can I get the file attachment? Can anyone suggest

how to send mail using phpmailer on xampp

邮差的信 提交于 2019-12-04 05:51:16
问题 I have been trying to send a mail using php mailer on xampp and i do get this error saying Message could not be sent. Mailer Error: The following From address failed: xxxx2@gmail.com : Called Mail() without being connected please, i need help on how to fix this. Here is my code; <?php require( 'class.phpmailer.php' ); $mail = new PHPMailer; $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->Host = "tls://smtp.gmail.com"; $mail->Port = 25; $mail->Username = "xxxx@gmail.com"; $mail->Password =

PHPMailer email sent successfully but not received (EC2)

怎甘沉沦 提交于 2019-12-04 05:36:20
问题 I am using PHPMailer on EC2. My account is not in a sandbox and Im sending from verified email. Im getting no errors from PHPMailer and thats my log 2017-03-31 06:24:52 Connection: opening to email-smtp.us-west-2.amazonaws.com:587, timeout=300, options=array ( ) 2017-03-31 06:24:52 Connection: opened 2017-03-31 06:24:53 SERVER -> CLIENT: 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-2007935443 svKFRJ5M6s1rqbMTRdZu 2017-03-31 06:24:53 CLIENT -> SERVER: EHLO ***.domain 2017-03-31 06:24

PHPMailer 5.1 sends duplicatie mails when adding more than 1 receiver

穿精又带淫゛_ 提交于 2019-12-04 05:14:36
I'm using PHPMailer for a while now and never really had any problems, but last week I installed one of my CMS on a website and the client insisted on having 2 e-mails receiving the contents of the contact form of his website. Ok, no problem I thought, just adding an e-mail address using the $phpmailer->AddAddress() function. However, adding a second receiver is causing PHPMailer to send the mail twice to both receivers. I tried adding a third receiver to see if I got it three times, but this didn't change anything. So adding 2+ receivers is causing PHPMailer to send the message twice to all

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

被刻印的时光 ゝ 提交于 2019-12-04 04:48:30
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 from console works good. FreeBSD 10.0, Apache24, php5.6. I could not find any information in google and

Force phpmailer to send mail with empty body

谁说胖子不能爱 提交于 2019-12-04 03:56:20
问题 I need to send an pdf file as attachment to a FAX gateway using phpMailer. If this email has a body, the fax will have a second page with this text. By saying: $mail->Body = ""; php Mailer returns Message body empty How can I force phpMailer to send emails without a body message? Here the complete code $mail = new PHPMailer(); $emailto = $_POST['sendto'].'@gateway.provider.xy'; $pdf_filename = 'PDF_list_'.date('dmY').'.pdf'; /* STMP Auth... */ $mail->From = $fmail; $mail->FromName = $row

PHPmailer without using SMTP

帅比萌擦擦* 提交于 2019-12-04 03:27:40
I've added the PHPMailer folder to my root folder on my web server and I just get an error that has to do with SMTP. Is there a way to use PHPMailer without needing to log into a mail account? Can I just have the server send the email to a address? I was searching this site and found this $email = new PHPMailer(); $email->From = 'you@example.com'; $email->FromName = 'Your Name'; $email->Subject = 'Message Subject'; $email->Body = $bodytext; $email->AddAddress( 'destinationaddress@example.com' ); $file_to_attach = 'PATH_OF_YOUR_FILE_HERE'; $email->AddAttachment( $file_to_attach , 'NameOfFile

PHPMailer Hangs on Send

依然范特西╮ 提交于 2019-12-04 01:24:27
问题 I had successfully setup a web app using WAMPSERVER on a desktop used by a few people internally, this used PHPMailer to an internal SMTP server without encryption or authentication and it worked. That desktop crashed and I've migrated to a "new" desktop. I had an SVN setup so I was even using most of the same files and config. One difference which might matter is that the old desktop was 64-bit and the new is 32-bit. This means I'm using different versions of WAMPSERVER. The mailer just