swiftmailer

Multipart email with swift

荒凉一梦 提交于 2019-12-10 15:45:49
问题 Multipart messages are not being correctly shown on gmail when on the iPhone. I have: $message->setBody($this->body, 'text/html'); $message->addPart($this->text_body, 'plain/text'); I have also used: $message->addPart($this->body, 'text/html'); $message->addPart($this->text_body, 'plain/text'); But in both cases, when reading gmail from the iPhone I get the message as a 'MIME-attachment'... No html and the MIME-attachment cannot even be read. The message will display fine if I don't add the

Symfony2 Monolog to Email Errors why swiftmailer.transport.real is non-existent service

爱⌒轻易说出口 提交于 2019-12-10 13:34:02
问题 after updating symfony from 2.3 to 2.4 i got ServiceNotFoundException Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'The service "monolog.handler.mojhandler" has a dependency on a non-existent service "swiftmailer.transport.real".' in E:\wamp\www\project\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass.php on line 59 here is my config_prod.yml imports

Cannot send message without a sender address in laravel 5.2 I have set .env and mail.php both

末鹿安然 提交于 2019-12-10 12:25:55
问题 In forgot password laravel sends email which gives error like : Swift_TransportException in AbstractSmtpTransport.php line 162: Cannot send message without a sender address i already have set my mail account details in .env and mail.php both. My .env : MAIL_DRIVER=smtp MAIL_HOST=smtp-mail.outlook.com MAIL_PORT=587 MAIL_USERNAME=raval_himanshu@live.in MAIL_PASSWORD=pass MAIL_ENCRYPTION=tls and my mail.php is <?php return [ 'driver' => env('MAIL_DRIVER', 'smtp'), 'host' => env('MAIL_HOST',

SwiftMailer silently ignores errors when messages fail delivery

淺唱寂寞╮ 提交于 2019-12-10 10:29:00
问题 When run from inside controller and when in-memory spooling is configured via spool: { type: memory } swiftmailer seems to work like this: whenever from within controller mailer->send($message) is called -> save message in memory when controller has finished work and symfony Kernel is about to shutdown (somwehere in event kernel.terminate or smth) - check messages saved in memory and _actually submit them to SMTP-server However this last step seems to silently ignore any errors which may be

SwiftMailer does not send mail, why?

可紊 提交于 2019-12-10 03:19:05
问题 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 ); $message->setFrom(ABSENDER); $message->setBody($nl_text); $transport = Swift_MailTransport::newInstance(); $mailer = Swift_Mailer::newInstance($transport); $logger = new Swift_Plugins_Loggers_EchoLogger(); $mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger));

How to correctly configure symfony2 swiftmailer bundle to work with SMTP server with NTLM AUTH?

ε祈祈猫儿з 提交于 2019-12-09 23:58:11
问题 # Swiftmailer Configuration swiftmailer: transport: smtp host: 10.8.100.1 port: 25 username: user password: pass auth_mode: ~ encryption: ~ spool: { type: memory } When I try to send a message via $this->get('mailer')->send($message); I am getting the following error: Fatal error: Uncaught exception 'Swift_TransportException' with message 'Failed to authenticate on SMTP server with username "user" using 0 possible authenticators' in /..path../vendor/swiftmailer/swiftmailer/lib/classes/Swift

Laravel 4 mail class, how to know if the email was sent?

家住魔仙堡 提交于 2019-12-09 14:30:56
问题 I'm using the new mail class in Laravel 4, does anybody know how to check if the email was sent? At least that the mail was successfully handed over to the MTA... 回答1: If you do if ( ! Mail::send(array('text' => 'view'), $data, $callback) ) { return View::make('errors.sendMail'); } You will know when it was sent or not, but it could be better, because SwiftMailer knows to wich recipients it failed, but Laravel is not exposing the related parameter to help us get that information: /** * Send

Receiving / retrieving email in CakePHP

﹥>﹥吖頭↗ 提交于 2019-12-09 06:07:15
问题 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 part. Of course, students are sometimes going to reply to emails and I'd like to retrieve them within my CRM and store them along with the student record. However, I cannot find a single reference to doing this. I've tried the following Google

Sending email with Swift Mailer, GMail and PHP, Permission Denied Error

时光怂恿深爱的人放手 提交于 2019-12-09 05:23:01
问题 I downloaded SwiftMailer 4.1.6 for sending email using Gmail. I had written the following code for that purpose. <?php require_once 'swiftmailer/lib/swift_required.php'; $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, "ssl") ->setUsername('jomit.jmt@gmail.com') ->setPassword('***********'); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('Wonderful Subject') ->setFrom(array('jomit.jmt@gmail.com' => 'Jomit Jose')) ->setTo(array('jomit

SwiftMailer - PHP - How to disable ssl certificate validation

不羁岁月 提交于 2019-12-08 17:28:35
问题 I need to disable the validation of ssl certificate for developing purpose but i don't find anything about this in official documentation. http://swiftmailer.org/docs/introduction.html I'm using php 5.6 and Symfony2 (v2.7). The configuration reference of SwiftMailerBundle is: swiftmailer: transport: smtp username: ~ password: ~ host: localhost port: false encryption: ~ auth_mode: ~ spool: type: file path: '%kernel.cache_dir%/swiftmailer/spool' sender_address: ~ antiflood: threshold: 99 sleep: