jeudi 22 décembre 2016

How to setup amazon mail in Swiftmailer for laravel?

I use laravel to send bulk campaign mail.

I need to send different users and different contents simultaneously.

But i also need to config amazon mail service for my laravel SwiftMailer.

I use the following to send mail,

   Mail::queue('woo.temp', array('token' => 'SAMPLE'), function ($message) use ($index, $queue) {
            $message = new \Swift_Message();

            $html = 'My HTML';
            $message->from('mymail@domail', 'Name');

            $message->to([$email1, $email2], 'Name')->subject('Test Subject')
                ->setBody($html, 'text/html');
            $message->getSwiftMessage();
        }); 

And my Mail Driver for Gmail setup,

 MAIL_DRIVER=smtp
 MAIL_HOST=smtp.gmail.com
 MAIL_PORT=465
 MAIL_USERNAME=mymail_id@domain.com
 MAIL_PASSWORD=****************
 MAIL_ENCRYPTION=ssl

But also, i need to setup this on directly, because campaigns have dynamic settings.

Single declaration is not required !

Is it Possible ?

Or any other solution ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire