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
0
votes
1 answer

How to change the name text of sender when sending mail with Swift Mailer v3.3.2

I'm using Swift Mailer v3.3.2 to send emails from my app and I need to be able to change the text of the sender. My code looks like this: //Sending email $swift = email::connect(); $email_message = new…
Alberto
  • 908
  • 2
  • 10
  • 25
0
votes
0 answers

Emails are suddenly only sent every hour

I have a cronjob that runs a command every minute. That command execute a "swiftmailer:spool:send" command: $this->getContainer()->get('project')->runCommand('swiftmailer:spool:send'); And this is the runCommand method: use…
Manolo
  • 24,020
  • 20
  • 85
  • 130
0
votes
2 answers

Change the location of the tmp directory for SwiftMailer in Symfony2

My shared hosting does not allow me to use the root \tmp directory. I know that the location of the temp directory can be updated using the Swift_Preferences class, however, how do I do that for a SwiftMailer instance autoloaded by Symfony2? Is…
Jon Winstanley
  • 23,010
  • 22
  • 73
  • 116
0
votes
1 answer

Blank pdf attachment while sent using FPDF and SwiftMailer

I am trying to create a PDF stream using FPDF library and to send the pdf over e-mail using Swift Mailer. Below is my code. The mail is sent successfully and even pdf is also attached but the pdf is of zero bytes size and so could not be opened.…
Mandar Joshi
  • 73
  • 2
  • 8
0
votes
1 answer

Gmail & SwiftMailer Fatal Error

I've looked everywhere and cannot find a solution for this. I just put up a website using GoDaddy hosting. The website has a form, which uses Gmail SMTP and was working perfectly when I was running a virtual host with XAMPP. After hosting with…
0
votes
1 answer

How to prevent an error to display to user

I have a simple code for sending mails. sometime $host might not available or my SMTP server might be down but what happens in these cases swiftmailer throws lot of exceptions and $result despite of returning true or false give me a complete mess of…
0
votes
1 answer

Symfony2 and Command Email sending - send the app_dev email

I have a Symfony2 command where I am sending some emails. Everything works fine except the fact that the email is sent as from the dev environement which uses the delivery_address by default. Here is how it works: Call the command class from the…
Milos Cuculovic
  • 19,631
  • 51
  • 159
  • 265
0
votes
1 answer

Using while loop to fetch details in Swift Mailer

In my code, I want to include while loop to fetch info from DB & send it in a table form to user. I tried to search numerous articles but no solutions worked for me actually. Here's my code: $message->setBody('
Guy in the chair
  • 1,045
  • 1
  • 13
  • 42
0
votes
2 answers

SwiftMailer - Adding PHP elements to the Message Body

I am trying to make the body of the mail with this [huge concatenation] $body=''.''.''.''.''.''; for($x=0;$x<=$length-1;$x++) { $body…
shivram
  • 469
  • 2
  • 10
  • 26
0
votes
0 answers

Swiftmail Email arriving an hour late

I am in England, and have just today moved a domain over to another server. The only problem is, the emails seem to be arriving an hour late. I am using SwiftMailer for PHP. I was getting an error about the timezones: Warning: phpinfo(): It is…
Chud37
  • 4,907
  • 13
  • 64
  • 116
0
votes
1 answer

How to make SUBJECT Substitutions in Sendgrid Swift SmtpTransport?

I am using Swift SmtpTransport as it seems to be the recommended way. However the documentation I found dos not show how to achieve Subject Substitutions. (This is what I am using)…
Luciano
  • 992
  • 1
  • 9
  • 17
0
votes
1 answer

Symfony2 send email not working

in config.yml # Swiftmailer Configuration swiftmailer: transport: sendmail username: %mailer_user% password: %mailer_password% disable_delivery: false in my controller: $from = $data['email']; //$sento =…
jsf
  • 68
  • 3
  • 13
0
votes
1 answer

Swiftmail no E-Mail will be send

I created a contact form in Symfony2. I would like to send it via email and also i want to save the content in the database via Symfony2, for this i created a form. The saving into the database works fine but I never get an email on the production…
joelschmid
  • 828
  • 1
  • 16
  • 32
0
votes
2 answers

swift attaching file to both letters

I`m sending two letters by Swift: $mail = Mailer::getInstance($oData->Subject); $mail->setTo($oData->Email, $oData->Recipient) ->setBody($body , 'text/html') …
0
votes
1 answer

Swiftmailer originator fields error

I am trying to fix an old application that uses Swiftmailer, but I have no idea how to fix this error: PHP Fatal error: Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given [mymail@yahoo.be] does not comply with…
David
  • 965
  • 3
  • 12
  • 24
1 2 3
99
100
DescriptionQuantityCost