定制 maatify/mailer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

maatify/mailer

最新稳定版本:5.0.1

Composer 安装命令:

composer require maatify/mailer

包简介

Official PHP library for maatify.dev Mailer handler, known by our team

README 文档

README

Current version Packagist PHP Version Support Monthly Downloads Total Downloads Stars

Mailer

Official PHP library for maatify.dev Mailer handler, known by our team

Installation

composer require maatify/mailer

Don't forget to create Class App\Assist\Maile

namespace App\Assist\Mailer;

class StgMail
{
    public  const stg_mailer_url = 'YOUR STG SENDER';
}

Create Env

EMAIL_SITE_URL // => ending with slash

EMAIL_SITE_LOGO

EMAIL_SITE_NAME

SITE_URL // => no slash at the end

Don't forget to create Class App\Assist\Config

namespace App\Assist\Config;

class MailerConfig
{
    private static self $instance;

    public static function obj(string $language_short_code = ''): self
    {
        if (empty(self::$instance)) {
            self::$instance = new self($language_short_code);
        }

        return self::$instance;
    }

    public function __construct(string $language_short_code = '')
    {
        if (empty($language_short_code)) {
            $language_short_code = 'en';
        }

        if(in_array($language_short_code, ['en', 'ar'])){
            $this->language_short_code = $language_short_code;
        }
    }

    private string $language_short_code = 'en';

    public function subjectTempPass(): string
    {
        return match ($this->language_short_code) {
            'ar' => 'الرقم السري المؤقت الخاص بك',
            default => 'Your Temporary Password',
        };
    }

    public function subjectResetPass(): string
    {
        return match ($this->language_short_code) {
            'ar' => 'تغيير كلمة المرور',
            default => 'Reset Password',
        };
    }

    public function subjectConfirmMail(): string
    {
        return match ($this->language_short_code) {
            'ar' => 'تأكيد البريد الإلكتروني',
            default => 'Confirm Mail',
        };
    }

    public function subjectOTPCode(): string
    {
        return match ($this->language_short_code) {
            'ar' => 'الرقم السري المتغير',
            default => 'OTP Code',
        };
    }

    public function subjectConfirmCode(): string
    {
        return match ($this->language_short_code) {
            'ar' => 'رمز التحقق',
            default => 'Confirm Code',
        };
    }
}

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2023-05-21