In laravel 4.x we can easily integrate the mail functionality. Laravel provide a simple API over popular SwiftMailer. We can simply configure our mail credential by using
app/config/mail.php
which allow you to change your SMPT host, port and credential.If we want to use php mail function then we will select mail as driver. In laravel we have sendmail driver is also available.
API Driver:-
By using laravel 4.x we can easily implement HTTP API's. Such as Mailgun, Mandrill Http API's. These API are much faster then SMTP server and by using laravel 4.x it is very easy to implement in your project.
If you want to use these service then we have to go to the path.
app/config/services.php
There we will define the configration of the service such as
For MailGun
'mailgun' => array(
'domain' => 'your-mailgun-domain',
'secret' => 'your-mailgun-key',
),
For Mandrill
'mandrill' => array(
'secret' => 'your-mandrill-key',
),
By this way we will use these services.
0 Comment(s)