Questions tagged [phpmailer]

PHPMailer is an email creation and sending class for PHP. PHPMailer is designed to communicate directly with other servers, unlike PHP's native `mail()` function.

PHPMailer is a PHP email creation and sending class featuring file attachments, SMTP servers, CCs, BCCs, HTML messages, word wrap, and more. Sends email via sendmail, PHP mail(), or directly with SMTP. Please make sure you download from the project page and not from older repos on SourceForge.

Useful links

5076 questions
214
votes
9 answers

PHPMailer character encoding issues

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 =…
Holian
173
votes
17 answers

require(vendor/autoload.php): failed to open stream

I know that this issue has been posted many times, but for me it seems to be a different problem. Indeed, this error Warning: require(vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\site_web\send_mail.php…
adrTuIPKJ44
  • 1,883
  • 2
  • 7
  • 7
154
votes
9 answers

Getting error while sending email through Gmail SMTP - "Please log in via your web browser and then try again. 534-5.7.14"

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…
ppalmeida
  • 2,614
  • 5
  • 18
  • 24
101
votes
2 answers

Send email with PHPMailer - embed image in body

I'm trying to send HTML mail, with PHPMailer, with images. The body is loaded from a html file, that contains all the info. When sending the mail, the image does not appear in the body, although I even send the image also as an attachment. HTML…
elvispt
  • 4,472
  • 7
  • 26
  • 34
100
votes
7 answers

Configure WAMP server to send email

Is there a way that I can configure the WAMP server for PHP to enable the mail() function?
user544079
  • 13,851
  • 35
  • 102
  • 160
90
votes
1 answer

PHP mailer multiple address

Possible Duplicate: PHPMailer AddAddress() Here is my code. require('class.phpmailer.php'); $mail = new PHPMailer(); $email = 'email1@test.com, email2@test.com, email3@test.com'; $sendmail = "$email"; …
Jorge
  • 5,112
  • 17
  • 44
  • 67
77
votes
12 answers

Unable to send email using Gmail SMTP server through PHPMailer, getting error: SMTP AUTH is required for message submission on port 587. How to fix?

I would like to send an email using Gmail SMTP server through PHP Mailer. this is my code IsSMTP(); $mail->CharSet="UTF-8"; $mail->SMTPSecure = 'tls'; $mail->Host =…
Mohammad Masoudian
  • 3,370
  • 7
  • 23
  • 40
74
votes
8 answers

Send File Attachment from Form Using phpMailer and PHP

I have a form on example.com/contact-us.php that looks like this (simplified):
adamdehaven
  • 5,772
  • 9
  • 56
  • 84
69
votes
12 answers

PHPMailer - SMTP ERROR: Password command failed when send mail from my server

I have used phpmailer() concept to send mail to users from my shared server using php script, but I'm not able to send even though everything is right in my script according to phpmailer code. My code like this: $message = " This is testing…
Punniyam Moorthi
  • 813
  • 1
  • 11
  • 19
63
votes
7 answers

PhpMailer vs. SwiftMailer?

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…
Paul Wicks
  • 55,730
  • 52
  • 115
  • 144
62
votes
2 answers

phpmailer: Reply using only "Reply To" address

I'm using phpmailer on my website and to help with spam issues I have created a mailbox to send these emails from (using SMTP). I have set the emails to come from the mailbox address and then I have added a reply to address for where I want the…
chapmanio
  • 2,554
  • 3
  • 18
  • 20
56
votes
18 answers

"SMTP Error: Could not authenticate" in PHPMailer

I'm using PHPMailer in a Simple Script For Send Email's Through Gmail, and I'm getting an "Unknown Error" (At least for me!): SMTP Error: Could not authenticate. Error: SMTP Error: Could not authenticate. SMTP server error: 5.7.1 Username and …
Alejandro Echeverri
  • 1,178
  • 2
  • 16
  • 30
55
votes
2 answers

phpMailer - How do you Remove Recipients

There are a lot of StackOverflow questions on this topic, but I couldn't find one that was able to help with the issue I'm having. The script that I'm writing sends out multiple emails to various recipients with different message contents. I can get…
Joe Majewski
  • 1,533
  • 1
  • 16
  • 30
54
votes
12 answers

PHPMailer: SMTP Error: Could not connect to SMTP host

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…
Ilian Andreev
  • 1,001
  • 3
  • 10
  • 18
53
votes
9 answers

Error handling with PHPMailer

I'm trying to use PHPMailer for a small project, but I'm a bit confused about error handling with this software. Hoping someone has experience with it. When I've set up an email and I use: $result = $mail->Send(); if(!$result) { // There was an…
Stomped
  • 1,800
  • 6
  • 18
  • 25
1
2 3
99 100