swiftmailer

symfony swiftmailer: mail not sent in prod-environment

∥☆過路亽.° 提交于 2019-12-07 09:56:50
问题 I have a symfony 2.8 app, with fosuserbundle implemented. In the dev environment, the registration confirm mails are sent, but not in the prod environment. There is no log message and the smpt configuration is correct. sf version: 2.8.1 swiftmailer-bundle version: current (compatible with sf version; 2.* in composer json) fosuserbundle: 1.3.5 ( * in composer) dev-config: imports: - { resource: config.yml } framework: router: resource: "%kernel.root_dir%/config/routing_dev.yml" #strict

How can I use fake sendmail with SwiftMailer on Windows?

血红的双手。 提交于 2019-12-07 09:03:35
问题 I wish to send emails using PHP on Windows via an external SMTP server. I must use SwiftMailer for this purpose. I can send emails via the external SMTP server using PHP's native mail() function and Fake Sendmail for Windows, but I cannot get SwiftMailer working. Working Setup Using PHP's mail() Function Here is the PHP code I use to send mail successfully using the native mail() function. $returnValue = mail ( $params['to' ], $params['subject'], $params['body' ], "From: Sender McSender <{

HostGator Won't Send Mail via PHP SwiftMail API

随声附和 提交于 2019-12-07 05:53:58
问题 Is there a reason why SwiftMail API for PHP won't run on HostGator? Their tech support said use the mail() command and that socket connections to port 25 won't work like that on their shared hosting plan. I complained and said that when you google on how to send attachments with mail(), people tell you to use SwiftMail. I need to send file attachments with the email. My code works just fine on A2Hosting, but not HostGator. In the API, I'm sending to localhost on port 25, using no

Swift-Mailer error, “Address in mailbox given [] does not comply with RFC”

a 夏天 提交于 2019-12-07 02:59:39
问题 I have built a simple PHP contact form that is supposed to send mail trough the Swift-Mailer script. Problem is I keep getting this error Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given [] does not comply with RFC 2822, 3.6.2.' Which I guess means I am using an invalid e-mail address. But since I am using myaddress@gmail.com to test the scrip the problem is probably somewhere else. This is my configuration: Where the mail is sent to: $my_mail = 'mymail

SwiftMailer Connection could not be established with host smtp.mailgun.org [closed]

大兔子大兔子 提交于 2019-12-06 21:05:47
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . If i use $transport = Swift_SmtpTransport::newInstance('localhost', 25); then it's working fine but when i'm using this settings it's not working $transport = Swift_SmtpTransport::newInstance('smtp.mailgun.org', 465, 'ssl') ->setUsername('mailegun username') ->setPassword('mailgun password'); This problem is in "godaddy" and "bluehost" account but in localhost using xampp it's working fine <?php ini_set('display

Disable swiftmailer spool in Symfony per environment

六眼飞鱼酱① 提交于 2019-12-06 19:31:32
问题 I having trouble send bulk emails with symfony2 via console command. I want to disable the mail spooling complete for the env the console is running in but keep it working for the default env. So I have this in config.yml: swiftmailer: transport: %mailer_transport% host: %mailer_host% port: %mailer_port% username: %mailer_user% password: %mailer_password% spool: %mailer_spool_type% and then each env has it's on parameters like parameters_prod.yml: parameters: mailer_transport: smtp mailer

PHP Swift Mailer Setup

旧巷老猫 提交于 2019-12-06 17:47:25
I'm trying to implement swift mailer into my website so I can send password recovery emails to registered users. I'm using dreamweaver. What I have done: 1) Downloaded Swift-4.2.2.tar 2) Extracted it 3) Uploaded to my host in /Domain/classes/lib 4) Included it in Recovery.php Here's my file structure Main Folder |classes |Swift |Private |Recovery.php And here's the code for Recovery.php : require_once '../classes/lib/swift_required.php'; // Create the Transport $email_to = $_POST["email"]; $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465) ->setUsername('Username') -

Symfony Send email in production environment

Deadly 提交于 2019-12-06 16:34:20
I am trying to send email in prod environment but it doesn't work... I am getting this log: [2014-06-30 09:37:54] request.CRITICAL: Uncaught PHP Exception Swift_TransportException: "Expected response code 250 but got code "530", with message "530 5.7.0 Must issue a STARTTLS command first. o2sm28357522wia.16 - gsmtp "" at C:\xampp\htdocs\UniDocs\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php line 386 {"exception":"[object] (Swift_TransportException: Expected response code 250 but got code \"530\", with message \"530 5.7.0 Must issue a STARTTLS command first

GMail Username and Password not accepted error when sending email with SwiftMailer

二次信任 提交于 2019-12-06 15:19:04
I get the following error when trying to use my GMail account to send an email from my PHP application with SwiftMailer. 535-5.7.8 Username and Password not accepted This is my SwiftMailer code: $transporter = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl') ->setUsername('ayrshireminiscontact@gmail.com') ->setPassword('~password-in-here~'); $mailer = Swift_Mailer::newInstance($transporter); $message = Swift_Message::newInstance('Portfolio Enquiry') ->setFrom(array('ayrshireminiscontact@gmail.com' => 'CRMPicco Portfolio Enquiry')) ->setTo(array('picco@crmpicco.co.uk' => 'A name')

Init application component with config from database

倾然丶 夕夏残阳落幕 提交于 2019-12-06 10:01:24
I'm building a Yii2 application that sends email through the swiftmailer extension . I store the email settings (smtp, ssl, username, etc..) in a database table, to be able to edit them with an apposite view. How can I init swiftmailer with config from the db table? Thank you. You can initialize application components using set() method available through application object Yii::$app : use Yii; ... // Get config from db here Yii::$app->set('mailer', [ 'class' => 'yii\swiftmailer\Mailer', 'transport' => [ 'class' => 'Swift_SmtpTransport', // Values from db 'host' => ... 'username' => ...