swiftmailer

Symfony swiftmailer via smtp gmail on localhost openssl error

可紊 提交于 2019-12-11 03:48:16
问题 After upgrading to php 5.6 (mac os x sierra) I'm not able to send mails on my local test environment. But sadly mail delivery via swiftmailer in Symfony does not work. This is the error: [Symfony\Component\Debug\Exception\ContextErrorException] Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed What I discovered until now: Since php 5.6 openssl seems a requirement:

Configure SwiftMailer “Local Domain” setting easily, in Symfony 2

对着背影说爱祢 提交于 2019-12-11 03:18:31
问题 SwiftMailer is the default way of sending email from a Symfony 2 project, and I'd like to use it in an application. I've pointed it towards the SMTP server provided by my internet provider (Virgin Media, in the UK), but my emails are not successfully sent. The exception thrown says Expected response code 250 but got code "501", with message "501 HELO requires valid address in response to the SMTP command HELO [::1] [::1] corresponds to localhost in IPv6, and it's not that surprising that the

Swift Mailer does not return smtp mail failure

心已入冬 提交于 2019-12-11 03:00:13
问题 I am using Swiftmailer to send emails with SMTP I need to get response from SMTP, but what I am trying is not working. Is it even possible? I tried an invalid email: dima44324d@vdaszdsd1dw.com - on the code below, which does not return errors if (!$mailer->send($message, $fails)) { echo "Failures:"; print_r($fails); return false; } return true; P.S. I don't want to use PhpMailer because I have other issues with it. 回答1: Remember that Swiftmailer simply hands the email over to an SMTP server.

Limit e-mail flow in Laravel

好久不见. 提交于 2019-12-11 02:27:43
问题 I'm working on an app built with Laravel 4.2. My app will send a pretty large amount of individual emails. The problem is that my SMTP server has a limit of max 300 mails/30 minutes and 5000 mails/day That will be enough for me. But I would want to control the flow of sen email by queuing them up to be sent at a rate of max 300 mails/30 mins. Is there a simple way of doing that, using Laravels libraries? 回答1: You're on the right track with the queue. Say you had a DB table with one row for

Laravel Mail Queue: change transport on fly

▼魔方 西西 提交于 2019-12-11 00:06:10
问题 I'm trying to use different SMTP configuration for each user of my application. So, using Swift_SmtpTransport set a new transport instance, assign it to Swift_Mailer and then assign it to Laravel Mailer. Below the full snippet: $transport = Swift_SmtpTransport::newInstance($mailConfig['smtp_host'], $mailConfig['smtp_port'], 'ssl'); $transport->setUsername($mailConfig['smtp_user']); $transport->setPassword($mailConfig['smtp_pass']); $smtp = new Swift_Mailer($transport); Mail::setSwiftMailer(

Swiftmailer only sends 999 emails from BCC

感情迁移 提交于 2019-12-10 22:12:23
问题 I am using Swiftmailer PHP Version 4.3.0 and I want to send one email with 1500 email addresses in the BCC. The limits on my server allow that I can send up to 10000 emails within 24h. I have not exceeded this limit. However, when I try to send the email with Swiftmailer it returns the following error message (see below for details) "421 too many messages in this connection "' and only 999 emails from the 1500 email addresses in the BCC receive the email. I executed this experiment several

Swiftmailer successfully sends but no mail received

风格不统一 提交于 2019-12-10 19:59:55
问题 I have made a simple contact form and use swiftmailer(with symfony2) to send and email. Everything is fine when I'm using gmail account but on production it has to be a noreply address in website domain. So I changed parameters to correspond this email account. It looks like it is working a send method return true but no message is received, i checked a spam folder but it didn't get there either. Settings are 100% correct as they work in thunderbird. Have no idea where to look for a problem.

Swiftmailer SMTP transport rejecting local IP address

会有一股神秘感。 提交于 2019-12-10 17:09:00
问题 I'm trying to send an email using the Swift_SmtpTransport but I'm getting the following error: 501 5.5.2 <[::1]>: Helo command rejected: invalid ip address The SMTP server is a remote server and it works from my production server, but not from my development machine, which is running OS X. It also doesn't bother to throw an exception, instead it required me to use a logger plugin to find out why it wasn't working. What can I do to make it use a real IP address? 回答1: I did some poking around

Swiftmailer Gmail Connection timed out #110

一笑奈何 提交于 2019-12-10 17:03:59
问题 I want to send emails using gmail's smtp with the PHP script posted below using Swiftmailer. Now this works fine on my own webserver. But when I used it on the webserver of the people I'm creating this for, I get an exception: Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [Connection timed out #110]' in ... What could be the problem? I'm assuming its got to do with the difference in server settings,

How to unlink files after they have been attached and sent? (When using Mail::queue)

≯℡__Kan透↙ 提交于 2019-12-10 16:27:20
问题 I switched from sending my mails immediately to adding them to the queue, here is my code, the $attachments is an array of temporary paths, I've commented out what I've tried, which throws errors about files not existing. Mail::queue($view, $data, function(\Illuminate\Mail\Message $message) use($mail,$attachments){ foreach($mail->getRecipients() as $recipient){ $message->to($recipient); } $message->subject($mail->getSubject()); foreach($attachments as $attachment){ $message->attach(