承接 smtp2go-oss/smtp2go-laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

smtp2go-oss/smtp2go-laravel

最新稳定版本:1.0.1

Composer 安装命令:

composer require smtp2go-oss/smtp2go-laravel

包简介

README 文档

README

This is a Laravel Service Provider for sending mail from a Laravel application via SMTP2GO. It should also work in Symfony applications due to Laravel's underlying dependency on Symfony mailer.

Requirements

  • PHP 8.2 or higher
  • Laravel 11.0 or higher
  • SMTP2GO account

Install

Install via composer: composer require smtp2go-oss/smtp2go-laravel

Setup - Laravel

  1. Set up environment variables:

Add the following entry to your .env file with your SMTP2GO api key.

SMTP2GO_API_KEY=api-YOUR_API_KEY_HERE

and change the existing MAIL_MAILER entry to smtp2go

MAIL_MAILER=smtp2go

  1. Add the following entry to config/mail.php
'smtp2go' => [
            'key' => env('SMTP2GO_API_KEY'),
            'transport' => 'smtp2go',
        ]

Setup - Symfony

  1. Add the following to your .env file
SMTP2GO_API_KEY=api-YOUR_API_KEY_HERE
MAILER_DSN=SMTP2GO://${SMTP2GO_API_KEY}@default
  1. If not already configured, import a services.php file in the config/services.yaml file
imports:
    - { resource: 'services.php' }
  1. Setup config/services.php, example below...
<?php
//config/services.php
namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use SMTP2GO\Transport\SMTP2GOTransportFactory;

return function (ContainerConfigurator $container): void {

    $services = $container->services();

    //if you already have a services.php file set up, you just
    //need to add this line...
    $services->set(SMTP2GOTransportFactory::class)
    ->tag('mailer.transport_factory');
};

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss changes.

License

This project is licensed under the MIT License.

Contact

For any questions or support, please contact SMTP2GO.

统计信息

  • 总下载量: 1.72k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-21