djangocms-forms
djangocms-forms copied to clipboard
Make email work on form submission wtih djangocms 3.11 and python 3.7
After installing correctly the plugin, and some small changes (like static instead of staticfiles in templates), the form submission was successful, but i didn't receive the mail. My first research led me to verify the mime structure of the mail by adding an 'alternative/mixed' level,
In fine, the problem was not here and it seems characters from mails template were the reason of the failed send.
After a lot of frustration, i have found that the ' Send via' line in hmtl an text email template was the cause. Apparently the 'http' mentionned is not appreciated.
So, i remove this line from email.thml: {% trans 'Sent via' %} {{ request.get_host }}{{ referrer }} And this line in email.txt: {% trans 'Sent via' %} http://{{ request.get_host }}
Now it works perfectly !