fourlabs/gmail-bundle
Composer 安装命令:
composer require fourlabs/gmail-bundle
包简介
Gmail API Wrapper for Symfony
README 文档
README
GmailBundle allows you to manage a Google Apps domain's inboxes (you can pick which). In order to do this, you must authorize a service account with domain wide delegation
Installation
$ composer require fourlabs/gmail-bundle
Configuration
// app/config/config.yml fl_gmail: admin_user_email: tech@slv.global json_key_location: /var/www/symfony/app/config/service_account_private_key.json gmail_message_class: \AppBundle\Entity\GmailMessage gmail_label_class: \AppBundle\Entity\GmailLabel gmail_history_class: \AppBundle\Entity\GmailHistory gmail_ids_class: \AppBundle\Entity\GmailIds swiftmailer: default_mailer: general_mailer mailers: general_mailer: transport: "%mailer_transport%" host: "%mailer_host%" username: "%mailer_user%" password: "%mailer_password%" spool: { type: memory } fl_gmail_api_mailer: transport: fl_gmail.swift_transport
Syncing Gmail Ids (i.e. Which emails need to be synced?)
FL\GmailBundle\Services\SyncGmailIds
- Takes a
$userIdparameter. - Gets a list of all the Gmail Ids, or the subset of Gmail Ids according to a history Id. What is a history Id?
- Dispatches
FL\GmailBundle\Event\GmailSyncIdsEventwith a list of all the new / updated ids. (Updated Gmail Ids = change of label) - It is your responsibility to save the Gmail Ids coming from this event.
- Dispatches
FL\GmailBundle\Event\GmailSyncHistoryEvent, such that next time, you can perform a Partial Sync. What is a Partial Sync? - It is your responsibility to save the History Id coming from this event.
Syncing Messages using Gmail Ids (i.e. I know which emails need to be synced, let's fetch them.)
FL\GmailBundle\Services\SyncMessages
- This service, takes a list of gmail ids and resolves all the new/updated messages for you.
- I.e. use the ids you are fetching from
FL\GmailBundle\Services\SyncGmailIds - Dispatches
FL\GmailBundle\Event\GmailSyncMessagesEvent. - It is your responsibility to save the Gmail Messages coming from this event.
- It is your responsibility to remove the newly synced Gmail Ids, you had previously saved with
FL\GmailBundle\Services\SyncGmailIds.
All this responsibility? 😢 😭
Why are there so many It is your responsibility statements? Because this bundle is storage agnostic. But don't fret! There
is a GmailDoctrineBundle that implements all of this in Doctrine for you.
How do I dive into this bundle?
- Start by looking into the
Modelclasses. - To understand the services, have a look at
Resources/config/services.yml.
What else is going on?
- You can send swiftmailer emails through
FL\GmailBundle\Swift\GmailApiTransport. Simply make sure the from is in your domain. FL\GmailBundle\Form\Type\InboxTypecontains a choice type, with all the inboxes in the authenticated domain.
License
GmailBundle is licensed under the MIT license.
fourlabs/gmail-bundle 适用场景与选型建议
fourlabs/gmail-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.81k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2016 年 10 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「php」 「Gmail API」 「Gmail Bundle」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fourlabs/gmail-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fourlabs/gmail-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fourlabs/gmail-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The bundle for easy using json-rpc api on your project
Magento2 email providers integration (smtp, mandrill, amazon ses)
Magento2 email providers integration (smtp, mandrill, amazon ses)
Bundle Symfony DaplosBundle
Send email with Gmail using this driver plugin.
Google Calendar API package for Laravel based on dacastro4/laravel-gmail
统计信息
- 总下载量: 1.81k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-07