Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Email templates and formatting

judgejjudgej
edited March 2011 in Vanilla 2.0 - 2.8
I'm sure it has been asked many times, but I cannot find anything in the search post 2006...

Is there a way to provide custom formatting for emails that are sent out to users? The client would like to change the text of most of the emails to be a "bit more friendly" and also make it more obvious who the email has come from (better title, introductory text, footer, even HTML to that a logo can be linked to).

I just can't seem to see where this would be done.

Comments

  • Options
    Okay, I have found (searched for "have a nice day"!) the content of some of the emails in the definitions file, so I can provide alternatives to the message body in a translation file.

    Now, a wrapper - any way outgoing emails can be wrapped in a HTML wrapper so that common footers etc. can be added?
  • Options
    LincLinc Detroit Admin
    I just use FetchView:

    $MessageBody = $this->FetchView('emailtemplate');
    $Email = new Gdn_Email();
    $Email->To($ContactEmail)
    ->Subject('Title of email')
    ->Message($MessageBody)
    ->MimeType('text/html')
    ->Send();
  • Options
    That's handy for custom code (plugins) and a good one to remember. I was just wondering whether there are any views used to send the standard default emails? Or perhaps I need to create a plugin that replaces the built-in email functions with something like this via hooks (and if there are no such hooks, then it would be nice to have some;-)
  • Options
    LincLinc Detroit Admin
    I don't know much about the built-in emails, but if you find you need a hook just give a yell. :)
  • Options

    +1 for a way to customize standard default emails. Has anyone found a way to do this?

  • Options
    x00x00 MVP
    edited June 2013

    grep is your friend.

  • Options

    If you are using vanilla 2.1 - this is a pretty cool add-on

    CustomizeText

    you can search for words and make changes and it automatically updates locale.php

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    i just uploaded an addon to make own template for default vanilla mails

    http://vanillaforums.org/addon/emailtemplate-plugin

    it is very simply but you can extend it

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    @guillermofr: Very cool!

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Options
    AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    hey @peregrine‌ , did the CustomizeText plugin disappear? I can't seem to find it.

  • Options
    peregrineperegrine MVP
    edited January 2015

    @AaronWebstey said: hey @peregrine‌ , did the CustomizeText plugin disappear? I can't seem to find it.

    it is still there. :) It's tricky to find.

    I just typed "CustomizeText" in the search box here in discussions forum. >:) and the links in the search showed it was available on github.

    there are a number of addons you may not be aware of that reside in addons github and possibly nowhere else.
    they may work for you, they are not advertised.

    https://github.com/vanilla/addons

    https://github.com/vanilla/addons/tree/2.1

    https://github.com/vanilla/addons/tree/master/plugins/CustomizeText

    you need to download the entire zip of the addons and extract out the plugin you want.

    personally, I would try the master branch of addons first, and if that doesn't work try the 2.1 branch of the addon.

    they may work for you, they may not.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭
    edited January 2015

    @peregrine‌ Oh, duh! I should have tried discussions ... was only searching addons. On your previous recommendation, I always check the master for plugins first - but this time just asked before I even checked there! Oops

    Thanks YAP!

Sign In or Register to comment.