Questions tagged [swiftmailer]

Swift Mailer is a library that integrates into any web app written in PHP, offering a flexible and elegant object-oriented approach to sending emails with a multitude of features.

Swift Mailer is a library that facilitates sending email in PHP.

Benefits over the native mail() function include the use of , , or a custom transport layer, support for servers that require authentication, prevention of header injection attacks, support for attachments and more.


Documentation :

1670 questions
8
votes
3 answers

Gmail locks account when sending mail via Laravel

When I try to send an e-mail through my website running Laravel 4, I get this exception: Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 …
Flobesst
  • 1,281
  • 1
  • 16
  • 26
8
votes
1 answer

What is the correct configuration for Monolog / Swiftmailer Html Formatter in Symonfy2?

I'm having trouble setting up Monolog to use Swiftmailer and the Html formatter. I have multiple monolog handlers and swiftmail mailers which might be the issue. Here's my config.yml Monolog section: services: monolog.formatter.html: …
Leevi Graham
  • 654
  • 8
  • 19
8
votes
2 answers

Symfony 2.3: How do you configure SwiftMailer to automatically use a custom plugin?

I have created a custom SwiftMailer plugin which I would like to have SwiftMailer use by default in my Symfony 2.3 application. The only documentation I can find in this regard is here:…
Nada_Surf
  • 616
  • 1
  • 7
  • 19
8
votes
1 answer

Swift mail from Symfony Command

I try to send a Swift mail from the commandline using a Symfony command. Though I get the following exception. Fatal error: Call to undefined method Symfony\Bundle\TwigBundle\Debug\TimedTwigE ngine::renderView() in ... A container is added to this…
Roel Veldhuizen
  • 4,613
  • 8
  • 44
  • 78
8
votes
2 answers

Swiftmailer exception doesn't catch in Symfony2 controller

I am developing a simple mailing application with Gmail account as host.It works like a charm but the problem rises when send() function throw an exception. I see that try catch statement can't handle the exception. It doesn't work even when I use…
CoderInNetwork
  • 2,923
  • 4
  • 22
  • 39
8
votes
2 answers

Sending group messages using send grid, gives 500 Internal Server Error

I want to send group messages using send grid. My group have 100 members.When I send a group message, 50 to 80 messages are delivered and then it shows a blank page as: NetworkError: 500 Internal Server Error My Code is, set_time_limit…
Navaneetha Nair
  • 312
  • 2
  • 12
8
votes
2 answers

using swift mailer of symfony 2, got an email but getting unnecessary response in email

getting this response by email "HTTP/1.0 200 OK Cache-Control: no-cache Content-Type: text/html; charset=UTF-8 Date: Tue, 13 Nov 2012 04:56:14 GMT". here is my code: public function sendEmail($subject, $template, $templateParams) { …
Syed Rehman
  • 97
  • 1
  • 7
8
votes
2 answers

How to send spool from swiftmailer without using command

How to send spool from swiftmailer without using command? php app/console swiftmailer:spool:send --env=prod I need to put this somehow into php file so that Server admin can add this to Schedule.
Tom
  • 1,203
  • 3
  • 15
  • 35
8
votes
7 answers

SwiftMailer does not send mail, why?

SwiftMail does not send my email, while mail() does work. Same as here. I added the EchoLogger but it does not print anything. $message = Swift_Message::newInstance(); $message->setSubject('Test'); $message->setTo( $email…
PiTheNumber
  • 22,828
  • 17
  • 107
  • 180
7
votes
1 answer

Swift_Mailer + symfony UTF-8

I have an issue with Swift_Mailer in Symfony. I am sending e-mail messages in French which contain a lot of "à é è" characters. At first when i tried sending these characters came out fine in my email-client, but in my colleague's email-client they…
Pino
  • 135
  • 1
  • 11
7
votes
4 answers

How to send pdf generated by TCPDF as Swiftmailer attachment

I already tried several solutions, the closest (for me) should look like this: $file = $pdf->Output('', 'E'); $message->attach(Swift_Attachment::newInstance($file, 'name.pdf', 'application/pdf')); $pdf is an instance of TCPDF and $message is an…
matino
  • 17,199
  • 8
  • 49
  • 58
7
votes
2 answers

Loading a custom Yii Component

I am trying to use a custom class I have created to send out mail so I can keep the controller files thin. I created my custom class and put it in the components folder. I then added: 'sendMail' => array( …
KyleVan
  • 501
  • 4
  • 9
  • 18
7
votes
1 answer

How secure can a PHP-driven HTML contact form using Swiftmailer be?

I have a PHP driven HTML contact form on my site. Currently I use the PHP mail() function. Because of that I have to do many user input validation to avoid email header injection attacks. I think I'm secure, but I probably forgot something and I…
AlexV
  • 22,658
  • 18
  • 85
  • 122
7
votes
1 answer

Swift-Mailer error, "Address in mailbox given [] does not comply with RFC"

I have built a simple PHP contact form that is supposed to send mail trough the Swift-Mailer script. Problem is I keep getting this error Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given [] does not…
Maverick
  • 1,988
  • 5
  • 24
  • 31
7
votes
5 answers

Symfony 4 SwiftMailer Gmail : Email not sent

I'm currently working on a Symfony 4 application and I need to send emails throught Swift Mailer. When I send an email, I receive the email spooled but I don't get it in my Gmail Mailbox. I allowed unsecure apps in my gmail configuration. This is my…
Salve Safari
  • 250
  • 1
  • 3
  • 10