How can I send HTML email by admincp

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Abdulla Ashoor
    Senior Member
    • Feb 2005
    • 628
    • 5.6.4

    [Forum] How can I send HTML email by admincp

    hello,

    is there are ways to send HTML emails by admincp? and how can accomplish this

    regards
    Please feel free to contact me if you have any questions or concerns

    Links: vBulletin Manual - Code Documentation - FAQ - Bug Tracker - Lemon Juice
    vBulletin 5 Connect: Extensions - Articles - Features - Purchases
  • Abdulla Ashoor
    Senior Member
    • Feb 2005
    • 628
    • 5.6.4

    #2
    ok I got it

    solved
    Please feel free to contact me if you have any questions or concerns

    Links: vBulletin Manual - Code Documentation - FAQ - Bug Tracker - Lemon Juice
    vBulletin 5 Connect: Extensions - Articles - Features - Purchases

    Comment

    • MarylandMommy
      Member
      • Sep 2007
      • 95
      • 3.6.x

      #3
      Can you share what you did, so that others reading or searching have the answer?
      Laura

      Site Admin of www.TheAmericanMommy.com and a local mommy group site. Both are Free groups open to moms.

      Comment

      • Abdulla Ashoor
        Senior Member
        • Feb 2005
        • 628
        • 5.6.4

        #4
        Originally posted by MarylandMommy
        Can you share what you did, so that others reading or searching have the answer?
        yes of course. but I don't know if there are security issues assosiated with this or not

        edit file forumdir/includes/class_mail.php

        find:

        PHP Code:
        text/plain 
        replace with:

        PHP Code:
        text/html 
        I think this can be achieved with plugins using "mail_send" hook to replace the $headers
        and make it more saftly when you are using this for specific users
        Last edited by Abdulla Ashoor; Sat 29 May '10, 6:25pm.
        Please feel free to contact me if you have any questions or concerns

        Links: vBulletin Manual - Code Documentation - FAQ - Bug Tracker - Lemon Juice
        vBulletin 5 Connect: Extensions - Articles - Features - Purchases

        Comment

        • Zachery
          Former vBulletin Support
          • Jul 2002
          • 59097

          #5
          That won't take care of some other issues, if it was really that easy we'd just do it.

          Comment

          • wynode
            Senior Member
            • Aug 2004
            • 329
            • 3.0.3

            #6
            Originally posted by Zachery
            That won't take care of some other issues, if it was really that easy we'd just do it.
            What's the reason that HTML email isn't allowed still ?

            Comment

            • David Copeland
              Senior Member
              • May 2000
              • 1354
              • 4.2.5

              #7
              Originally posted by Abdulla Ashoor
              yes of course. but I don't know if there are security issues assosiated with this or not

              edit file forumdir/includes/class_mail.php

              find:

              PHP Code:
              text/plain 
              replace with:

              PHP Code:
              text/html 
              I think this can be achieved with plugins using "mail_send" hook to replace the $headers
              and make it more saftly when you are using this for specific users
              Will this work with Ver 4.2 ?

              DAVID COPELAND
              Licensed VB Holder Since 2000
              Celebrating 22 Years with VB

              Comment

              • Panthro
                New Member
                • Nov 2012
                • 5
                • 4.1.x

                #8
                Originally posted by wynode
                What's the reason that HTML email isn't allowed still ?
                The problem with this is that all other emails will just stop working.

                as you're sending all your emails with text/htmls emails that are plain text and don't have like, a <br > for line break WON'T show up as it was supposed to do with normal CR line breaks.

                You'd need to change ALL your email templates to have like the <br> in place...I know because I did that for phpbb and it was a mess...

                The problem with vbulletin is that it's harder to update a bunch of email templates....as they're all phrases.

                Comment

                • Abdulla Ashoor
                  Senior Member
                  • Feb 2005
                  • 628
                  • 5.6.4

                  #9
                  Try this. Create a new plugin and add the following then save.

                  Hook Location: mail_send
                  Title: Auto HTML Emails

                  PHP Code:
                  PHP Code:
                  if(strlen($message) != strlen(strip_tags($message)))
                  {
                      
                  $headers str_replace('Content-Type: text/plain''Content-Type: text/html'$headers);

                  Plugin Active: Yes


                  Note: use at your own risk. We do not provide support for third party addons including my suggestion.
                  Please feel free to contact me if you have any questions or concerns

                  Links: vBulletin Manual - Code Documentation - FAQ - Bug Tracker - Lemon Juice
                  vBulletin 5 Connect: Extensions - Articles - Features - Purchases

                  Comment

                  • LEARNER29
                    Senior Member
                    • Nov 2001
                    • 316
                    • 3.6.x

                    #10
                    Originally posted by Abdulla Ashoor
                    Try this. Create a new plugin and add the following then save.

                    Hook Location: mail_send
                    Title: Auto HTML Emails

                    PHP Code:
                    PHP Code:
                    if(strlen($message) != strlen(strip_tags($message)))
                    {
                    $headers str_replace('Content-Type: text/plain''Content-Type: text/html'$headers);

                    Plugin Active: Yes


                    Note: use at your own risk. We do not provide support for third party addons including my suggestion.
                    this is EXACTLY what this mod does
                    Mini Mods - Send emails with HTML as HTML vBulletin 4.x Add-ons
                    .

                    Comment

                    • Mark.B
                      vBulletin Support
                      • Feb 2004
                      • 24287
                      • 6.0.X

                      #11
                      This thread is six years old, no need to bump it up.
                      MARK.B
                      vBulletin Support
                      ------------
                      My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                      My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                      Comment

                      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...