1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Registration Email HTML vs. Text - Why two?

Discussion in 'XenForo Questions and Support' started by ProCom, Oct 1, 2013.

  1. ProCom

    ProCom Active Member

    I've abandoned any and all pride and will just post my dumb questions when I can't find the answers after much searching.

    In xF I see the following phrases for the registration email:
    • user_email_confirmation_body_html
    • user_email_confirmation_body_text
    Why are there two of these? When is one sent / used vs. the other? Do I need to configure both each time I want to change this email?
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    If the user doesn't accept HTML emails, it'll use the _text phrase. I would suggest modifying both.
  3. ProCom

    ProCom Active Member

    Thanks Jeremy!

    Is the user's choice to receive HTML vs. text a user selectable field in their xF control panel (I couldn't' find it) or done at the service, client, ISP level?
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    I'm mistaken, it's not an option. I'll have to dig in the code to properly verify / answer this.
    SneakyDave likes this.
  5. HWS

    HWS Well-Known Member

    If it works like email usually works (I didn't look into the XF code), a single standard email consists of 2 parts. The HTML part and the text part. If the mail client of the receiver is not able to show (or instructed to avoid) HTML, it will automatically show the text part. Otherwise it will automatically show the HTML part.

    So you have to change both phrases in sync. Otherwise you don't know who sees what. ;-)

    A good suggestion for the developers would be to expand XF to automatically strip all HTML from the code in the HTML phrase and create the text phrase automatically.
    Liam W likes this.
  6. Liam W

    Liam W Well-Known Member

    But then the issue comes from when the email text isn't phrased and is just done via email templates. Although, the same thing can be done...
  7. Jeremy

    Jeremy XenForo Moderator Staff Member

    If there's hard coded text, it's a bug.

Share This Page