Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
My form has 2 language options (french* and english*). Upon selecting french, the submitted webform data gets formated and displayed correctly in the received email. The english one doesn't. (displays only the raw HTML data in the received email)
Note: the html template is the same for both french and english
*French being my translated language
*English being the original language
Comment | File | Size | Author |
---|---|---|---|
#10 | Edit Spanish translation for Contact webform Webform Demo Site.png | 562.17 KB | jrockowitz |
#3 | Screen Shot 2017-03-07 at 6.28.55 AM.png | 15.5 KB | jrockowitz |
Comments
Comment #2
vasmir CreditAttribution: vasmir commentedComment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@vasmir Welcome to the Drupal community.
It is possible that your mail server/client is having a problem with the emails.
Can you turn on email debugging for each handler and see what is displayed onscreen?
Comment #4
vasmir CreditAttribution: vasmir commented@jrockowitz
Thanks for the welcome.
I am using webform with the smtp authentification module as my core mail function doesn't work/doesn't send mails.
I turned on debugging something interesting happens..
The html template gets formated correctly (during french output), but upon english submit, the html data comes in raw without any formatting.
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThat helps a lot. I will try to find to duplicate the issue locally.
One very simple question... Is HTML enabled for both emails?
Comment #6
vasmir CreditAttribution: vasmir commentedYes, I activated HTML for both emails. HTML is also enabled in my smtp settings.
Another interesting and weird observation I made: Like I stated, without smpt module, webform won't send mails. On the other hand, when smpt is activated BUT Html is turned off in the smtp settings, suddenly the html gets formatted in webform but not perfectly.
let me help you with duplicating, here my settings:
-activate HTML for webform handler and in the smtp module
-paste your html template in the translate tab in webform for french
-paste your html template in the original language mail handler (english)
-created a form with language switcher (where users can pick between french and english)
Comment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedIt is very likely that the Webform configuration translation might be losing the send as HTML setting.
Comment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI can't duplicate this issue. Hopefully someone who is using the SMTP module can help us figure out the problem.
Comment #9
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI can't get SMTP working using Gmail. http://www.symphonythemes.com/drupal-blog/configure-drupal-smtp-gmail
Comment #10
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedSo, I finally got SMTP working and was able to send HTML emails the source and translated languages.
It is worth noting that each translation has it's own template.
Comment #11
vasmir CreditAttribution: vasmir commentedAs I understood, in the "email body" field, the value "default" refers to the value selected in the mail handler, but in the handler, you can't change the default text. I tried with the "custom" option but it doesn't do anything. How did you manage to add your HTML template in the "default" text?
Comment #12
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe default template can be edited and translated via /admin/structure/webform/settings
The custom template should be editable. Please look at the browser's console to see if any errors are being logged.
Comment #13
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented