[英]Typo3 8.7: Different mail templates for form finisher EmailToReceiver / EmailToSender
我將 Typo3 表單模塊 (sysext) 與兩個電子郵件完成程序一起使用:EmailToReceiver 與 EmailToSender。 我設置了一個自定義郵件模板,但是
您可以使用templatePathAndFilename
完成器選項為您的郵件設置自定義模板。 您可以為每個整理器分別設置:
finishers:
- identifier: EmailToReceiver
options:
# ...
templatePathAndFilename: EXT:my_site/Resources/Private/Templates/.../EmailToReceiver.html
- identifier: EmailToSender
options:
# ...
templatePathAndFilename: EXT:my_site/Resources/Private/Templates/.../EmailToSender.html
除了 Mathias Brodala 的正確答案,您還可以在每個電子郵件完成程序中使用templateName
和templateRootPaths
。 如果配置如下,它將尊重您使用options.format
設置的電子郵件格式:
finishers:
-
identifier: EmailToReceiver
options:
subject: 'E-Mail from website'
recipientAddress: your.company@example.com
recipientName: 'Your Company name'
senderAddress: '{email}'
senderName: '{lastname}'
replyToAddress: ''
carbonCopyAddress: ''
blindCarbonCopyAddress: ''
format: html
attachUploads: 'true'
templateName: '{@format}.html'
templateRootPaths:
20: 'EXT:your_extension/Resources/Private/Forms/Emails/Receiver/'
translation:
language: ''
-
identifier: EmailToSender
options:
subject: 'Your message'
recipientAddress: '{email}'
recipientName: '{lastname}'
senderAddress: your.company@example.com
senderName: 'Your Company name'
replyToAddress: ''
carbonCopyAddress: ''
blindCarbonCopyAddress: ''
format: html
attachUploads: 'true'
templateName: '{@format}.html'
templateRootPaths:
20: 'EXT:your_extension/Resources/Private/Forms/Emails/Sender/'
根據上面設置的文件路徑,然后將模板保存在
完整的教程可以在這里找到。
在 GitHub 上是一個有效的 TYPO3 擴展,其中包含幾個示例表單,包括一個帶有僅針對發件人的自定義郵件模板的表單。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.