Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Smtp Notifications Channel Laravel Package

aiqedge/smtp-notifications-channel

Laravel notification channel to send emails via the AIQEDGE SMTP API. Configure credentials in .env/services.php, add AiqedgeSmtpChannel to via(), and return message data from toAiqedgeSmtp(). Failed requests are logged via Laravel.

View on GitHub
Deep Wiki
Context7

AIQEDGE SMTP Channel

A Laravel notification channel for sending emails via the AIQEDGE SMTP API. This package lets you deliver notifications using AIQEDGE's SMTP service, making it easy to integrate external email delivery into your Laravel applications.

Features

  • Send notifications through AIQEDGE SMTP API
  • Simple integration with Laravel's notification system
  • Error logging for failed requests

Installation

Install the package via Composer:

composer require aiqedge/smtp-notifications-channel

Configuration

Add your AIQEDGE SMTP credentials to your .env file:

AIQEDGE_SMTP_KEY=your-api-key-here
AIQEDGE_SMTP_URL=https://api.aiqedge.com/smtp

Then, add the following to your config/services.php:

'aiqedge_smtp' => [
    'key' => env('AIQEDGE_SMTP_KEY'),
    'url' => env('AIQEDGE_SMTP_URL'),
],

Usage

1. Add the Channel to Your Notification

In your notification class, add the via() method to specify the channel:

public function via($notifiable)
{
    return [AiqedgeSmtpChannel::class];
}

2. Define the toAiqedgeSmtp() Method

Add a toAiqedgeSmtp() method to your notification class. This should return an array with the email details:

public function toAiqedgeSmtp($notifiable)
{
    return [
        'to' => $notifiable->email,
        'subject' => 'Your Subject',
        'body' => 'Your message body',
        // Add other fields as required by AIQEDGE SMTP API
    ];
}

3. Send the Notification

Use Laravel's notification system as usual:

$user->notify(new YourNotification());

Request Body Reference

To see the possible request body and required fields, visit this Postman collection:

AIQEDGE SMTP Send Email Request Example (Postman)

Example

use Aiqedge\SmtpNotificationsChannel\AiqedgeSmtpChannel;
use Illuminate\Notifications\Notification;

class InvoicePaid extends Notification
{
    public function via($notifiable)
    {
        return [AiqedgeSmtpChannel::class];
    }

    public function toAiqedgeSmtp($notifiable)
    {
        return [
            'to' => $notifiable->email,
            'subject' => 'Invoice Paid',
            'body' => 'Your invoice has been paid.',
        ];
    }
}

Error Handling

If the API request fails, the error will be logged using Laravel's logging system. Check your logs for details.

License

This package is open-sourced software licensed under the MIT license.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours