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
7
votes
3 answers

Send mail from local machine using laravel

I want to send mail from my local machine using laravel 5.4 in a forget password API. But I am getting Swift_TransportException (1/1) Swift_TransportException Expected response code 220 but got code "502", with message "502 Command not…
Salini L
  • 829
  • 5
  • 15
  • 43
7
votes
2 answers

Passing Unique Arguments to SendGrid Using Swiftmailer

Hi I'm using the php mailer Swiftmailer to send through SendGrid using the SMTP API. We can pass unique arguments to SendGrid to help track the email. I've been successful in passing unique headers with Swiftmailer: $headers =…
Acyra
  • 15,864
  • 15
  • 46
  • 53
7
votes
1 answer

Swiftmailer: Unable to connect with TLS encryption

I'm trying to send emails via Symfony with Swiftmailer. On the production server I get an error: [2016-08-20 11:59:37] app.ERROR: Exception occurred while flushing email queue: Unable to connect with TLS encryption [] [] This is what I have in my…
Clearasil
  • 245
  • 1
  • 2
  • 11
7
votes
1 answer

Swift_TransportException·Connection could not be established with host smtp.sendgrid.net [Connection timed out #110]

I am using Laravel 4.2, which uses the swiftmailer lib for email. I am trying to use the Sendgrid SMTP service but I am getting an timeout error on my staging server. Everything works fine in my local development. mail.php return array( …
Patrick_Finucane
  • 725
  • 1
  • 7
  • 24
7
votes
6 answers

Get content of email sent during command tests

During my tests I call some commands which send emails. I can display the number of emails sent with the following command: $output->writeln( $spool->flushQueue( $this->getContainer()->get('swiftmailer.transport.real') ) ); The…
A.L
  • 10,259
  • 10
  • 67
  • 98
7
votes
3 answers

Can swiftMailer be used on localhost to send emails?

I am currently not receiving emails using the below configuration and was wondering if's it something to do with my set up maybe missing something or it doesnt work on MAMP localhost? main-local.php in common config directory 'mailer' => [ …
con322
  • 1,119
  • 7
  • 16
  • 29
7
votes
3 answers

Laravel sending separate, multiple mail without using foreach loop

I am using Mail function in laravel under the SwiftMailer library. Mail::send('mail', array('key' => $todos1), function($message) { …
Ronser
  • 1,855
  • 6
  • 20
  • 38
7
votes
4 answers

How to attach PDF to email using Swiftmailer in Symfony2

I am sending an email using swiftmailer in symfony2, but I would like to add a specified PDF file as a file attachment to the email. How would I do that? Here is my current code: $message = \Swift_Message::newInstance() ->setSubject('Hello…
Krishna Ghodke
  • 589
  • 2
  • 6
  • 26
7
votes
3 answers

Symfony 2 Swiftmailer + Amazon SES: Failed to authenticate on SMTP server with username "XXXXXXXXXXXXXXXX" using 2 possible authenticators

I know this question have been asked before but any of the given responses read have become into a solution for this scenario with Symfony2 + Swiftmailer + Amazon SES. I setup Amazon SES account details for Swiftmailer in Symfony2, all the…
emorales
  • 95
  • 1
  • 2
  • 6
7
votes
1 answer

Data array not send in email view

I'm sending emails with Laravel 4 : $data = Input::all(); Mail::queue(array('text' => 'e-Text', 'html' => 'e-Html'), $data , function($message) use ($data) { $message->to($temp['data'], $data['nom']) …
Fractaliste
  • 5,777
  • 11
  • 42
  • 86
7
votes
2 answers

Add mail to Send folder with SwiftMailer

I'm using SwiftMailer for PHP from swiftmailer.org Everything works well but I wonder if there is a way to add the sent message into the sent folder from the mail account that SwiftMailer is sending from? That's all, have a nice day.
Rotari Radu
  • 645
  • 6
  • 13
7
votes
7 answers

swiftmailer Swift_TransportException gets uncaught by try-catch block

For a project (which is about estate properties) i have included a contact form where a visitor can contact an estate broker if the visitor is interested to buy/hire an estate property. I am using Symfony2 and its library. For the contact mail, i am…
KarelG
  • 5,176
  • 4
  • 33
  • 49
7
votes
1 answer

How to test email in functional test (Symfony2)

I'm trying to test email in functional test... My source code is the same as the example of the cookbook, the controller : public function sendEmailAction($name) { $message = \Swift_Message::newInstance() ->setSubject('Hello Email') …
Ousmane
  • 2,673
  • 3
  • 30
  • 37
7
votes
2 answers

fosUserBundle sends email registration empty

so when i registre via fosUserBundle form on production env it sends an email to my gmail but there is no confirmation link in the email, there is just this registration.email.message in the title and in the body of the email, someone knows why ?
Rachid O
  • 13,013
  • 15
  • 66
  • 92
7
votes
1 answer

How to define an additional mailer service to use the spool and send instant emails in Symfony2

In my Symfony2 web app I'm supposed to send two kind of emails: instant and bulk. The instant emails should be send right away while the bulk emails should be send using the spool. With the default configuration of the Swiftmailer in Symfony2 it is…
David Barreto
  • 8,887
  • 7
  • 32
  • 46