pendable/symfony-mailer
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
pendable/symfony-mailer 适用场景与选型建议
pendable/symfony-mailer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 669 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 08 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 pendable/symfony-mailer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pendable/symfony-mailer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 669
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-08-15