knowproinsight/sendingmail

You send welcome mail to your user using this package!

v1.0.1 2022-01-05 07:50 UTC

This package is auto-updated.

Last update: 2025-07-05 14:54:20 UTC


README

You can download it via run this command on your terminal

composer require knowproinsighter/sendingmails

It is has some dependencies you can follow the below steps to use this package in your project:

  1. First of all run the below command it will create App\Mail\SendMailToUser.php file.
php artisan make:mail SendMailToUser
  1. then return the following code inside build method of SendMailToUser.php.
return $this->subject('Congrats, You have successfully registered!')->view('sendingmails::email');

EDIT:- You can write your own message inside subject as well...

  1. Edit Your .env file
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=...... //Fill your username
MAIL_PASSWORD=......// Fill your password
MAIL_ENCRYPTION=tls
  1. Edit your default sender details inside Config\mail.php
'from' => [
  'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
  'name' => env('MAIL_FROM_NAME', 'Example'),
],

Now, Package is all setup you can send mail by hiting the URL

localhost:8000/sendmail

Feel free to raise your issue if you found any wierd..

Thank you

Enjoy Surffing