承接 passionweb/mailjet-api 相关项目开发

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

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

passionweb/mailjet-api

Composer 安装命令:

composer require passionweb/mailjet-api

包简介

Mailjet API integration so users can subscribe to your newsletter(s) and be added to your Mailjet mailing list(s)

README 文档

README

What does it do?

This extension uses the Mailjet API so users can subscribe to your newsletter(s) and be added to your Mailjet mailing list(s). It comes with two plugins. One with the mailjet subscription form and one with the mailjet verification form.

You can customize the subscription form to your individual (Mailjet) needs. You can choose which fields should be displayed and how they are mapped to the corresponding contact fields in Mailjet, which field(s) should be used for the receiver name and which field should be used for the email.

Requirements

  • TYPO3 >= 11.5.0
  • PHP >= 7.4
  • Mailjet API key and secret key

Installation

composer require "passionweb/mailjet-api"
  • Install the extension via composer
  • Add the necessary RouteEnhancer (see #necessary-routeenhancer)
  • Add your Mailjet API key and secret key to the extension configuration before using the extension
  • Flush TYPO3 and PHP Cache

Configuration

Necessary RouteEnhancer

  • Add the following RouteEnhancer to the section routeEnhancers in your site configuration (config.yaml):
    MailjetDoubleOptIn:
        type: Simple
        limitToPages: [ YOUR_PID ]
        routePath: '/{contact_id}'
        requirements:
            contact_id: '[0-9]{1,10}'
        _arguments: {}

Frontend configuration "enforceValidation" and "excludedParameters" (TYPO3 v12)

You need to add the contact_id parameter to the excludedParameters if you don't use the limitToPages option of the RouteEnhancer and if it should be possible to call the same page (where your mailjet verification plugin is included) with the contact_id as an argument and without the contact_id.

$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash'] = [
    'enforceValidation' => true,
    'excludedParameters' => [
        'contact_id',
    ],
];

Extension configuration

There are the following extension settings available.

# cat=Mailjet settings; type=string; label=Mailjet API key;
mailjetApiKey= YOUR_MAILJET_API_KEY

Enter your Mailjet API key.

# cat=Mailjet settings; type=string; label=Mailjet secret key;
mailjetSecretKey= YOUR_MAILJET_SECRET_KEY

Enter your Mailjet secret key.

# cat=Mailjet settings; type=string;  label=Mailjet API version
mailjetApiVersion = v3

Enter the current Mailjet API version.

How editors should use the extension

Add your required properties

The properties are used to define the fields for the subscription form and the associated mapping to the Mailjet fields. The following fields are available:

  1. Form property name: The name of the property in the subscription form
  2. Mailjet property name: The name of the (contact) property in Mailjet
  3. Form property type: Select the type of the field in the subscription form (possible values: text, email, tel, number, url)
  4. Form field placeholder: The placeholder text for the field in the subscription form
  5. Form field required: Select if the current field is required in the subscription form or not (default: false)
  6. Use for Mailjet name: Select if the current field should be used for the name in your Mailjet subscription and verification email (default: false)
  7. Use for Mailjet email: Select if the current field should be used for the email in your Mailjet subscription and verification email (default: false)

Add required properties

Add and configure plugin "Mail subscription form"

  1. Add the plugin "Mailjet subscription form" to your selected page

  2. Configure the plugin settings:

    • Storage Pid: select the storage where subscription records should be stored
    • Form fields/properties: Select all properties you want to use in your subscription form
    • Form field for the email address: Select the property you want to use for the email address in your subscription email
    • Form field(s) for the email receiver name: Select the property or properties you want to use for the receiver name in your subscription email
    • Mailjet ListID: Enter the ID of the Mailjet list you want to use for the subscription
    • From email for subscription email: Enter the email you want to use as the sender of your subscription email
    • From name for subscription email: Enter the name you want to use as the sender of your subscription email
    • Subject for subscription email: Enter the subject you want to use for your subscription email
    • Mailjet TemplateID for subscription email: Enter the ID of the Mailjet template you want to use for the subscription email
    • Redirect to page after form submit: select the page where users should be redirected after submitting the subscription form

Add and configure mail subscription form

Add and configure plugin "Mail verify subscription"

  1. Add the plugin "Mailjet verify subscription" to your selected page (should be different from the page with the subscription form)

  2. Configure the plugin settings:

    • Mailjet ListID: Enter the ID of the Mailjet list you want to use for the verification (must be the same as in the plugin "Mail subscription form")
    • From email for verification email: Enter the email you want to use as the sender of your verification email
    • From name for verification email: Enter the name you want to use as the sender of your verification email
    • Subject for verification email: Enter the subject you want to use for your verification email
    • Mailjet TemplateID for verification email: Enter the ID of the Mailjet template you want to use for the verification email

Add and configure mail verify subscription

Important notes

The extension uses the external service Mailjet. To use the extension, you need a Mailjet account and an API key For more information visit the Mailjet website.

Troubleshooting and logging

If something does not work as expected take a look at the log file first. Every problem is logged to the TYPO3 log (normally found in var/log/typo3_*.log)

Achieving more together or Feedback, Feedback, Feedback

I'm grateful for any feedback! Be it suggestions for improvement, extension requests or just a (constructive) feedback on how good or crappy the extension is.

Feel free to send me your feedback to service@passionweb.de or contact me on Slack

passionweb/mailjet-api 适用场景与选型建议

passionweb/mailjet-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 10 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「extension」 「typo3」 「Mailjet」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 passionweb/mailjet-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 passionweb/mailjet-api 我们能提供哪些服务?
定制开发 / 二次开发

基于 passionweb/mailjet-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2023-10-16