1

I've created a site with 30 providers of workshops. Each provider has its own contact form. I now have a separate template for each provider. The hook "emailto" is, in fact, the only variable in the template. I would like to have one template, and specify via TV the mailaddress that Formit should use.

I have tried it with &emailTo=`[[+mailaddress]]` and &emailTo=`[[+tv.mailadres]]` but unfortunately without result. Can it be done? And if so, how?

Jako
  • 832
  • 5
  • 11
LeoWolff
  • 29
  • 1
  • why the placeholder? [+] is this being called via getresources or a custom snippet?? If it's just in a template treat the TV like any other page variable... [[*mailaddress]] – Sean Kimball Jan 13 '16 at 15:49
  • thanks. In the rtfm about email hooks, I saw an example with a placeholder. That put me on the wrong track. Life can be easy :-) – LeoWolff Jan 15 '16 at 10:35
  • Sorry to bother you again. I still have a problem. When I use a mailadres that belongs to the site /domain, it works fine. Any other mailadres (e.g. gmail.com or one of my own mailadresses) fails. Processing the form seems to be ok. After submitting I get the redirectpage. But I don't receive the form in my mailbox. Any suggestions? – LeoWolff Jan 21 '16 at 11:53

1 Answers1

3

If the email address is saved in the template variable 'mailaddress' on each provider resource, you have to call FormIt with

&emailTo=`[[*mailaddress]]`
Jako
  • 832
  • 5
  • 11
  • thanks. In the rtfm about email hooks, I saw an example with a placeholder. That put me on the wrong track. Life can be easy :-) – LeoWolff Jan 15 '16 at 10:35
  • Sorry to bother you again. I still have a problem. When I use a mailadres that belongs to the site /domain, it works fine. Any other mailadres (e.g. gmail.com or one of my own mailadresses) fails. Processing the form seems to be ok. After submitting I get the redirectpage. But I don't receive the form in my mailbox. Any suggestions? – LeoWolff Jan 21 '16 at 11:53
  • If you get to the redirect page and the email hook is called before the redirect hook, the mail must have been sent. So it has to be a spam filter on the receiving side. – Jako Mar 11 '16 at 07:29