Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
504 views
in Plugins by

1 Answer

+2 votes
by

You could do this with a little hack I think. In qa-app-mailing.php, change:

'html' => false,

... to ...

'html' => true,

And then enter the HTML code for the message in the usual admin field.

I have not tried this so please test it on yourself first and let me know if it works!

by
Happy New Year, gid! Thanks for the tip. It works.

However, I suggest adding nl2br to 'body'=> to parse new lines as line breaks by default. Otherwise you have to set all <br /> tags by yourself...

Change from:
'body' => trim(qa_opt('mailing_body'))."\n\n\n".qa_lang('users/unsubscribe').' '.$unsubscribeurl,

to:
'body' => nl2br( trim(qa_opt('mailing_body'))."\n\n\n" ).qa_lang('users/unsubscribe').' '.$unsubscribeurl,

all the best,
Kai
by
This hack/feature is just awesome! Should become core!

I wrapped the unsubscribe link into an anchor and made the font smaller. Now we can add images, better text formatting, background-colors etc.

I am using now:
'body' => nl2br( trim(qa_opt('mailing_body'))."\n\n\n" ).' <span style="font-size:12px;color:#888">'.qa_lang('users/unsubscribe').' <a style="color:#888" href="'.$unsubscribeurl.'">Unsubscribe</a></span>', // added nl2br and span

PS: The only thing missing is to add the username (handle) in front of the email. Like 'Hello '.$username.'!'; As requested here: http://www.question2answer.org/qa/14266/
...