carter/mailer

this package is to send emails.

v1.0.3 2019-07-11 05:37 UTC

This package is auto-updated.

Last update: 2024-09-06 23:10:58 UTC


README

#Mailer package Issues Forks Stars

This package is to send email

How to Install

You can install this by running following composer command

composer require carter/mailer

Run the follwoing command and publish it

php artisan vendor:publish

After publish you will find a new file "mailer.php" in your config folder.Please add necessarry details in that file

##How to use in controller

First thing you need to do is add the follwoing line in provider section of your "config/app.php".

Carter\Mailer\MailerServiceProvider::class,

Add Follwing line in your controller

use Mailer;

##How to use this package to send mail

You can send mail using this package by adding follwing line of code

$to="yourmail@example.com";
#or
$to=array('yourmail@example.com'=>'YourName','secondmail@example.com'=>'SecondName');

$subject="Subject of the email";
$message="Body of your message" #you can also load the view in your message

$result=Mailer::sendmail($to,$subject,$message);