我正在使用Typo3表单模块(sysext)和两个电子邮件终结者:EmailToReceiver与EmailToSender。我设置了一个自定义的mailtemplate,但是
答案 0 :(得分:3)
您可以使用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
答案 1 :(得分:2)
除了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/'
根据上面设置的文件路径,模板将保存在
中可以找到完整的教程here。
在GitHub上a working TYPO3 extension有几个示例表单,包括仅为发件人提供自定义邮件模板的表单。