laravel - Does Mailchimp have a send API is Automation the way to go?
问题描述
I was about to start developing my companies website which is currently in research phase. I was researching with the MailChimp API (https://developer.mailchimp.com/documentation/mailchimp/reference/overview/) but did not find the API for using a send mail function by manager told me that it was present in our previous version of the company's website.
I came across Automation in MailChimp (https://developer.mailchimp.com/documentation/mailchimp/reference/automations/#%20) can this be used to make a send email request, but I don't see the option for setting email send time in the api.
Can any one help?
解决方案
欢迎!
如果我猜对了,你想使用 MailChimp 从 Laravel 发送邮件/通知吗?
使用这个 composer package可以很容易地做到这一点,但它不受 Laravel 的约束。
只需在您的 CLI 中运行:
composer require drewm/mailchimp-api
然后你可以像这样调用 MailChimp API v3:
use \DrewM\MailChimp\MailChimp;
$MailChimp = new MailChimp('abc123abc123abc123abc123abc123-us1');
$result = $MailChimp->get('lists');
$list_id = 'b1234346';
$result = $MailChimp->post("lists/$list_id/members", [
'email_address' => 'davy@example.com',
'status' => 'subscribed',
]);
如果您想要更多 Newsletter 功能,可以使用spatie/laravel-newsletter 包:
composer require spatie/laravel-newsletter
然后按照文档进行操作。
希望这可以帮助!
推荐阅读
- security - Azure DevOps 设置中是否有一种方法可以创建不与单个用户关联的个人访问令牌 (PAT) 等效项?
- android - 商米V2 with Flutter
- strapi - Strapi 是否在免费套餐 AWS t3.micro 中运行?
- java - 如何创建一个whatssap按钮以向我的Android应用程序中的特定联系人发送消息?
- azure - 我可以使用自定义策略为 MFA 使用两个电子邮件地址吗?
- api-platform.com - 无法访问服务器上的管理界面
- ios - 无需调用处理程序块即可满足通知的期望
- angular - ngOnChanges 未被调用,但视图已正确更新
- angular - Angular 中连续 HTTP 请求的动态数量
- python - 对来自两个不同 JSON 文件的具有相同 ID 的对象进行分组