swiftmailer

Swift Mailer Delivery Status

て烟熏妆下的殇ゞ 提交于 2019-11-28 19:13:25
Does anyone know if SwiftMailer send function returns delivery status? I would like to be able to know that email was delivered or not delivered.Is this possible? Thanks There are at least three layers of checks that SwiftMailer supports, that will report several types of delivery failures. 1) Always check the return code from SwiftMailer's send() or batchSend() commands for a non-zero result. From the documentation : //Send the message $numSent = $mailer->send($message); printf("Sent %d messages\n", $numSent); /* Note that often that only the boolean equivalent of the return value is of

Configure Symfony2/Swiftmailer to use “sendmail -t”

吃可爱长大的小学妹 提交于 2019-11-28 13:47:01
I'm currently trying to get Symfony2/Swiftmailer to send the contents of a submitted form via mail. My parameters.yml contains the following: mailer_transport: sendmail mailer_host: ~ mailer_user: ~ mailer_password: ~ Since the sendmail version on my server does not support the -bs option, which Swiftmailer seems to use by default, I have to find a way to tell Symfony2/Swiftmailer to use sendmail -t instead. Swift_Transport_SendmailTransport seems to support that, but there doesn't seem to be a corresponding configuration option for SwiftmailerBundle. How do I tell Swiftmailer to use sendmail

Laravel email with queue 550 error (too many emails per second)

泄露秘密 提交于 2019-11-28 13:30:45
Our emails are failing to send using Laravel with a Redis Queue. The code that triggers the error is this: ->onQueue('emails') $job = (new SendNewEmail($sender, $recipients))->onQueue('emails'); $job_result = $this->dispatch($job); In combination with this in the job: use InteractsWithQueue; Our error message is: Feb 09 17:15:57 laravel: message repeated 7947 times: [ production.ERROR: exception 'Swift_TransportException' with message 'Expected response code 354 but got code "550", with message "550 5.7.0 Requested action not taken: too many emails per second "' in /home/laravel/app/vendor

PHP Fatal error: 'Swift_TransportException' with message 'Failed to authenticate on SMTP server

懵懂的女人 提交于 2019-11-28 08:49:51
I know this question's been asked before and I've read all the posts out there, but I still can't find a solution to this. I have a windows machine with wamp installed on it. When I try to send a simple email via google's SMTP server everything works fine. Though, when I copy that same script to an Ubuntu 12 machine, it gives me that error: PHP Fatal error: Uncaught exception 'Swift_TransportException' with message 'Failed to authenticate on SMTP server with username "xxx@gmail.com" using 2 possible authenticators' in /home/TestMail/SwiftMail/lib/classes/Swift/Transport/Esmtp/AuthHandler.php

How to set 'FROM' property using Swiftmailer with Gmail?

北战南征 提交于 2019-11-28 08:08:23
问题 <?php require_once 'lib/swift_required.php'; $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl') ->setUsername('username@gmail.com') ->setPassword('password') ; $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('HomeWork') ->setFrom(array('exampleFROM@gmail.com' => 'NAME')) ->setTo(array('exampleTO@gmail.com'=> 'NAME')) ->setBody('Test Message Body') ; $mailer->send($message); ?> It works but sender is 'username@gmail.com'. How can

Laravel mail: pass string instead of view

不羁岁月 提交于 2019-11-28 04:52:30
I want to send a confirmation e-mail using laravel. The laravel Mail::send() function only seems to accept a path to a file on the system. The problem is that my mailtemplates are stored in the database and not in a file on the system. How can I pass plain content to the email? Example: $content = "Hi,welcome user!"; Mail::send($content,$data,function(){}); update: In Laravel 5 you can use raw instead: Mail::raw('Hi, welcome user!', function ($message) { $message->to(..) ->subject(..); }); This is how you do it: Mail::send([], [], function ($message) { $message->to(..) ->subject(..) // here

Tracking email bounces, opens, clicks

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 04:34:57
I found How do you make sure email you send programmatically is not automatically marked as spam ? to (hopefully) be a solid guide to avoiding being marked as spam. Are there any other important tips/suggestions? How do I track bounces,opens,clicks? These are features found in paid services like Mail Chimp and Campaign Monitor . Do the same as Mail Chimp and Campaign Monitor then. LIE about your stats. There is no accurate way to track emails. If there was it'd just get blocked again. Most people don't want you to know these things and most email software ensures you don't. The stats provided

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

蹲街弑〆低调 提交于 2019-11-28 04:27:19
问题 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 of your regular password. I have the following settings on mail.php : return [ 'driver' => env('MAIL_DRIVER', 'smtp'), 'host' => env('MAIL_HOST', 'smtp.gmail.com'), 'port' => env('MAIL_PORT', 465), 'from' => ['address' => 'meaprogrammer@gmail.com',

PHP, Swift-mailer problem

谁说胖子不能爱 提交于 2019-11-28 02:00:55
When I click submit button on my contact page, trying to submit a form that uses swift-mailer, I get this: Warning: fopen(uploads/) [function.fopen]: failed to open stream: No such file or directory in /home/polycys2/public_html/html/swift-mailer/lib/classes/Swift/ByteStream/FileByteStream.php on line 131 Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [uploads/]' in /home/polycys2/public_html/html/swift-mailer/lib/classes/Swift/ByteStream/FileByteStream.php:133 Stack trace: #0 /home/polycys2/public_html/html/swift-mailer/lib/classes/Swift

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

笑着哭i 提交于 2019-11-27 18:23:50
问题 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 impossible to do that because there is only one mailer service. Similar questions has been asked here in SO ( How to spool emails (in a task) and send normal emails in the moment in the other controllers? ) with no luck, but according to this