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

Sending html and css mails to gmail with Swift Mailer

I have some basic html and some css but for some reason gmail puts 3D infornt the 'text/css' Code sample $message = "
grape1
  • 759
  • 2
  • 8
  • 19
6
votes
3 answers

CakePHP SwiftMailer SMTP TLS OpenSSL Error SSL3_GET_RECORD:wrong version number

I'm attempting to send an email using the CakePHP SwiftMailer component I found here: http://bakery.cakephp.org/articles/sky_l3ppard/2009/11/07/updated-swiftmailer-4-xx-component-with-attachments-and-plugins The server I'm sending to is using SMTP…
Zetaphor
  • 504
  • 10
  • 24
6
votes
3 answers

Receiving / retrieving email in CakePHP

I am developing a basic yet highly customized CRM for a small training centre which has the ability to store student records and also send emails to them. I'm using SwiftMailer following this excellent tutorial in CakePHP to accomplish the sending…
Joseph
  • 2,737
  • 1
  • 30
  • 56
6
votes
1 answer

Does SwiftMailer support asynchronous mail sending the way Mail_Queue does?

I want to send my emails using sendgrid's SMTP servers, but connecting to them, not at "Web-time", but via a (simple) queue. I know PEAR's Mail_Queue can enable me to do that, but can I do it using SwiftMailer? (What are exactly the fonctional…
julien_c
  • 4,942
  • 5
  • 39
  • 54
6
votes
4 answers

Sending email using office365 server with swiftmailer in symfony

I'm trying to send an confirmation email after registration using swiftmailer and office365 server in symfony. I've tried every combination of host,port and encryption type I've come across. Currently my .env file contains this…
Mario Klisanic
  • 545
  • 2
  • 9
  • 18
6
votes
3 answers

When using Gmail for SMTP, can you set a different "from" address?

I am using Swift Mailer 406 for sending emails. I connect to my smtp.gmail.com account and then I do: ->setFrom(array($from => $fromname)) But the emails sent got the original gmail account email. Can I change it?
anon
6
votes
6 answers

Configuring Emails in Laravel

I am trying to setup emails in my Laravel aplication, I have my env file something like this: MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=noreply@xxx.com MAIL_PASSWORD=xxx MAIL_ENCRYPTION=tls I tried according to the…
Nitish Kumar
  • 6,054
  • 21
  • 82
  • 148
6
votes
1 answer

Is there a symfony value for /tmp (or other similar folder location)?

I have a Symfony 3.3 application that is successfully sending an email with an attachment. The relevant function looks like this: private function sendEmail($data) { $vgmsContactMail = self::contactMail; $mailer = $this->get('mailer'); …
6
votes
1 answer

How to add header via Swift mailer

I am trying to add header to message sent via swift mailer. $message = Swift_Message::newInstance($title) ->setFrom(array('mail@mail.com' => 'Name')) ->setTo(array($email => $email)) ->setBody($content,…
Ivan
  • 171
  • 2
  • 12
6
votes
3 answers

Sending email to multiple Recipients with swiftmailer

I am trying to use swiftmailer in my project so that I can send html newsletter to multiple users. I have searched thoroughly but all i got never worked for me. I want to paste more than one recipient in the form input field seperated by comma and…
Mario brown
  • 73
  • 1
  • 1
  • 7
6
votes
1 answer

Laravel Mailer Callback when using Queue

Is there a way to pass a callback function to Laravel's mailer? I'm using the Mail facade with a mailable class, which is sending out an attachment. I would like to delete the attached file form storage once the email is sent. The email job is…
crabbly
  • 5,106
  • 1
  • 23
  • 46
6
votes
1 answer

Expected response code 220 but got code "", with message "" in laravel 5.3

Drive setting in my .env file is as follow MAIL_DRIVER=sendmail MAIL_HOST=gmail-smtp-msa.l.google.com MAIL_PORT=587 MAIL_USERNAME=abc@abc.com MAIL_PASSWORD=password MAIL_ENCRYPTION=ssl and in my config/mail.php my configurations are …
Muhammad Sipra
  • 806
  • 2
  • 11
  • 27
6
votes
6 answers

Laravel SwiftMailer : Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required

I am using laravel 5.2, And the using Swift Mailer for password resetting. I have 2-step verification on my gmail.. As the google help says : If you've turned on 2-Step Verification for your account, you might need to enter an App password instead…
Gammer
  • 5,453
  • 20
  • 78
  • 121
6
votes
2 answers

Getting a list of attachments from Swift_Message object

As we can see below there isn't any method called getAttachments() so how can I list/get/loop thru the attachments from Swift_Message object? I couldn't find any info in documentation or an example. All the methods are listed below as follows and…
BentCoder
  • 12,257
  • 22
  • 93
  • 165
6
votes
6 answers

Swiftmailer from Advanced Yii 2.0 does not work with gmail

I'm trying to configure swiftmailer in the advanced yii 2.0 template. I've gone through many posts and I understand that there are some issues with gmail. My configuration environment in development is the following: 'mailer' => [ 'class' =>…
Betty Sanchez
  • 219
  • 3
  • 11