tt_products不会向客户发送确认邮件

编程语言 2026-07-10

我想让tt_products给客户发送确认邮件。客户是一个已登录的前端用户。于是我尝试了以下TypoScript:

plugin.tt_products.orderEmail.10002{
to = TEXT
to {
data = TSFE:fe_user|user|email
}
}

但我没有收到邮件,而是收到了以下错误:

Email "TEXT" does not comply with addr-spec of RFC 2822.

我正在使用tt_products 2.16.7和 TYPO3 12.4.44。到底我哪里做错了?

解决方案

好吧,错误其实很直接。你写在头部的不是邮箱地址,而是在头部写入了值 "TEXT",这是行不通的。这里有一个默认配置,应该能够满足你的需要。你检查过吗? https://github.com/franzholz/tt_products/blob/2cd6655f394757c5b48559e9e08b5eb757c30f77/Configuration/TypoScript/PluginSetup/Main/setup.typoscript#L585

备选方案

以下标准的TypoScript定义就足够了。

...
orderEmail {
# email to the shop
     10000.suffix = shop
     10000.from = shop
     10000.returnPath = {$plugin.tt_products.orderEmail_returnPath}
# email to the customer
     10002.suffix = customer
     10002.from = shop
     10002.returnPath = {$plugin.tt_products.orderEmail_returnPath}
}
..

但我在子部件###BASKET_INFO_TEMPLATE###中把以下输入字段注释掉了。

<input type="text" name="recs[delivery][email]" size="60"
                          value="###DELIVERY_EMAIL###">

启用该输入字段后,一切就又能正常工作。

站内所有文章版权归属LeftHeroAI导航站,无授权禁止任何主体转载、抄袭、复制内容,亦不得私自架设镜像站点。一经侵权,本站将通过法律途径追责。

相关文章