swiftmailer

Bounce Support for Swiftmailer

跟風遠走 提交于 2019-12-06 05:39:31
I see recommendations for Swiftmailer for handling bounce messages here, yet I don't see the support for this in the documentation. Am I missing something? It appears to me that PHPMailer-BHM is the only option out there with this feature ready to go out of the box. If this is incorrect, please elaborate. I am asking because Swiftmailer looks to have the best documentation and support moving forward, but I don't want to spend time re-inventing the wheel creating a class to parse and handle the NDR's. Swiftmailer is more concerned with sending email (e.g. from your script to an SMTP server

Swift Mailer attachments

半城伤御伤魂 提交于 2019-12-06 05:20:58
问题 I'm creating a CSV on the fly with PHP, I then need to attach this CSV file to the the Swift Mailer Message. I have tried using file_get_content on the created file aswell as using chunk_split(base64_encode(file_get_contents()) on the created file aswell as attaching the file before writing it to disk. Without writing to disk I get Rescource #183 in the CSV, with attaching it with file_get_content I get just a string in each row of the CSV file, anyone know what I'm doing wrong? if(!file

Symfony2 SwiftMailer Connection could not be established with host smtp.gmail.com

和自甴很熟 提交于 2019-12-06 05:10:37
After reading an testing a lot of solutions, I still getting this error. My parameters.yml parameters: database_host: 127.0.0.1 database_port: null database_name: symfony database_user: root database_password: null secret: holamundo mailer_transport: smtp mailer_encryption: ssl mailer_port: 465 mailer_auth_mode: login mailer_host: smtp.gmail.com mailer_user: justexample@gmail.com mailer_password: nottherealone And my config.yml # Swiftmailer Configuration swiftmailer: transport: %mailer_transport% encryption: %mailer_encryption% auth_mode: %mailer_auth_mode% host: %mailer_host% port: %mailer

SwiftMailer Batch email times my Server out

隐身守侯 提交于 2019-12-06 04:36:38
问题 I realise that batchEmail is no longer part of the new SwiftMailer. So I made this script: <? // // GC PRESS EMAILER v5 // ini_set('display_errors',1); error_reporting(E_ALL); require_once("config.php"); include_once("hawkmail/mail/lib/swift_required.php"); $c=mysql_connect($dbh,$dbu,$dbp); function SendEmail(){ // DB $s=mysql_query("SELECT * FROM `newgc`.`press_list`"); // Process Color Listing Loop while($r=mysql_fetch_array($s)){ // ########################### // START LOOP // ############

Got issue with Swift Mailer Not sending messages

余生长醉 提交于 2019-12-06 02:12:59
I have an issue with swift mailer, it is not sending message to the user I extracted the library to inc folder in my website and created the following message for swift mailer to send: NOTE: If you can suggest other solutions besides SwiftMailer, could you please leave a comment. require_once 'inc/lib/swift_required.php'; //Create the Transport $transport = Swift_SmtpTransport::newInstance('mail.mywebsite.com', 25) ->setUsername('info@mywebsite.com') ->setPassword('myPassword') ; $mailer = Swift_Mailer::newInstance($transport); //Define Message Subject $message = Swift_Message::newInstance(

How can I use fake sendmail with SwiftMailer on Windows?

一笑奈何 提交于 2019-12-05 16:31:55
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 <{$params['from']}>" ); echo "mail() returned "; var_dump($returnValue); Here is the relevant portion of my

symfony swiftmailer: mail not sent in prod-environment

自作多情 提交于 2019-12-05 12:25:13
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_requirements: true profiler: { only_exceptions: true } web_profiler: toolbar: true intercept_redirects: true

Send mail through smtp.gmail.com in symfony 2 using swiftmailer

廉价感情. 提交于 2019-12-05 11:35:37
I am having a trouble of sending mail from xampp localhost using gmail. And after a long time I finally successful on it. And I am sharing it with all you. If I am wrong need proper solution for it. in config.yml of your symfony 2 Write those swiftmailer: disable_delivery: false transport: %mailer_transport% host: %mailer_host% username: %mailer_user% password: %mailer_password% port: %mailer_port% encryption: %mailer_encryption% In your parameters.yml mailer_transport: smtp mailer_host: smtp.gmail.com mailer_user: gmail_user_id_without_@gmail.com mailer_password: Your_gmail_pass mailer_port:

Unittesting Laravel 5 Mail using Mock

让人想犯罪 __ 提交于 2019-12-05 11:05:30
Is there a way to test Mail in Laravel 5? tried the only legit Mock example I see on the internet but it seems it only works on Laravel 4. current code below. $mock = Mockery::mock('Swift_Mailer'); $this->app['mailer']->setSwiftMailer($mock); ...some more codes here... $mock->shouldReceive('send')->once() ->andReturnUsing(function($msg) { $this->assertEquals('My subject', $msg->getSubject()); $this->assertEquals('foo@bar.com', $msg->getTo()); $this->assertContains('Some string', $msg->getBody()); }); this is the contents of ApiClient.php, the last line is line 155, which is indicated in the

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

偶尔善良 提交于 2019-12-05 06:14:50
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@mydomain.com'; $my_name = 'My Name'; The content of the message: $name = trim($_POST['name']); $email