承接 pendable/symfony-mailer 相关项目开发

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

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

pendable/symfony-mailer

最新稳定版本:v1.0.1

Composer 安装命令:

composer require pendable/symfony-mailer

包简介

Symfony Pendable Mailer Bridge

README 文档

README

Provides Pendable integration for Symfony Mailer.

Pendable

Pendable provides a wrapper service around Amazon SES adding capabilities to Parallelize your Email Sending, Prioritize your Emails, Schedule delivery in the future, Track Open, Click and other events, Active throttling based on your Bounces and Complaints, Filter Spam Domains, Maintain a healthy Contact list, Retrieve, Troubleshoot, and Resend messages, Timeline view of all customer communication.

More info on pendable.io

Installation

Open a command console in your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require pendable/symfony-mailer

Add the following line on config/services.php

<?php
// config/services.php

return [
    Pendable\SymfonyMailer\Transport\PendableTransportFactory:
        tags: [ mailer.transport_factory ]
];

Finally, add your MAILER_DSN credentials into your .env file of your project:

You can use HTTP API transport by configuring your DSN as this:

MAILER_DSN=pendable+api://$PENDABLE_API_KEY@default

Usage

$email = (new Email())
  ->from('mydomain@test.com')
  ->to('to@test.com')
  // ->cc('...')
  // ->addCc('...')
  // ->bcc('...')
  // ->replyTo('...')
  ->subject("Subject")
  ->html('<p>Html content of Symfony Pendable email.</p>')
  ->text('Text content of your Symfony Pendable text-only email.');

$email->getHeaders()
    ->add(new MetadataHeader('key-1', 'value-1')) // Custom field called 'key-1'
    ->add(new MetadataHeader('key-2', 'value-2')) // Custom field called 'key-2'
    ->add(new TagHeader('TagInHeaders1')) // Tags
    ->add(new TagHeader('TagInHeaders2')) // Tags
    ->addTextHeader('priority', 60)
    ->addTextHeader('config_identifier', 'custom key')
    ->addTextHeader('client_email_id', '123476AB')
    ->addTextHeader('schedule_send_at', '2023-06-25T22:37:26+05:30');

// Send the email using the custom Pendable transport
try {
    $resp = $mailer->send($email);
    return new Response('Email sent successfully to Pendable.');
} catch (\Exception $e) {
    return new Response('Failed to send email to Pendable: ' . $e->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR);
}

Changelogs

  • v1.0.1 (September 10, 2023):
    • Throw exception when some feature is not yet supported by Pendable
    • Readme updated
  • v1.0.0 (September 1, 2023):
    • Initial release

Resources

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-15