PHPackages                             ahmedrady255/email-template-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ahmedrady255/email-template-manager

ActivePackage

ahmedrady255/email-template-manager
===================================

this package is made to provide templates for different types

04PHP

Since Sep 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ahmedrady255/email-template-manager)[ Packagist](https://packagist.org/packages/ahmedrady255/email-template-manager)[ RSS](/packages/ahmedrady255-email-template-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Email Template Manager for Laravel
==================================

[](#email-template-manager-for-laravel)

A Laravel package for managing email templates with built-in SMTP configuration.

Features
--------

[](#features)

- Manage and customize email templates.
- Send emails with different types using predefined templates.
- Simple SMTP configuration and integration.
- Easy-to-use API for sending emails.

Installation
------------

[](#installation)

### 1. Install the Package

[](#1-install-the-package)

You can install the package via Composer:

```
composer require ahmedrady255/email-template-manager
```

### 3. Install SMTP Configuration (Optional)

[](#3-install-smtp-configuration-optional)

Run the SMTP installation command to set up default SMTP settings:

```
php artisan email-template-manager:install-smtp
```

Configuration
-------------

[](#configuration)

### SMTP Settings

[](#smtp-settings)

The package uses SMTP for sending emails. You can configure the SMTP settings in your `.env` file or in the `config/email_templates.php` configuration file.

**Example `.env` settings:**

```
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your-smtp-username
MAIL_PASSWORD=your-smtp-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=your-email@example.com
MAIL_FROM_NAME="${APP_NAME}"
```

### Email Templates

[](#email-templates)

Define and customize email templates in the `resources/views/vendor/email-templates/` directory. By default, this directory contains the template files you can modify.

**Example template:**

`resources/views/vendor/email-templates/welcome_email.blade.php`

```

    Welcome to Our Service

    Hello {{ $name }},
    Thank you for signing up for our service!
    Best regards,
    The Team

```

Usage
-----

[](#usage)

### Sending an Email

[](#sending-an-email)

You can send email by add the service to your controller

**Example Request:**

```
