TYPO3 Powermail SPF safe

From snippet wiki
Jump to navigation Jump to search

A simple contact form with the users email address. You can't just use that address as the sending email address, otherwise it will fail with an SPF error. If you just enter noreply@ it will make your support stuff angry. So you have to add a reply-to header:

plugin.tx_powermail.settings.setup.receiver.overwrite {
 senderEmail.value = noreply@your-website.de

 replyToEmail.value >
 replyToEmail = TEXT
 replyToEmail.data = GP:tx_powermail_pi1|field|e_mail

 replyToName = TEXT
 replyToName.value >
 replyToName.data = GP:tx_powermail_pi1|field|name
}

Some hints:

  • The Reply-To function of powermail only works if both values (email and name) are defined!
  • You have to undefine the email-value in order to use the data property!
  • Double check the input name attributes of the contact form for their names: e_mail and name