Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+9 votes
792 views
in Q2A Core by
edited by

Q2A HTML Emails

https://github.com/MominRaza/qa-html-email

Warning: You need to modify one q2a core file.

Steps to enable

  1. put qa-lang-emails.php file in your language folder, if you are using default language than put it in en-GB and change language to en-GB.

  2. change line 56 in qa-include/app/emails.php

    function qa_send_notification($userid, $email, $handle, $subject, $body, $subs, $html = true)
  3. change line 115 in qa-include/app/emails.php

    'body' => strtr(qa_lang('emails/email_header'), $subs) . (empty($handle) ? '' : qa_lang_sub('emails/to_handle_prefix', $handle)) . strtr($body, $subs) . strtr(qa_lang('emails/email_footer'), $subs),
  4. thats it.

Screenshots

Q2A version: v1.8.6
by
+1
Thats a nice start. Would be good to have an option to store and modify HTML templates.
by
That can be solved without modifying core files. Just hook on the email sending process and pre-process all the data and configuration you want in that stage. You would even have a different lang file
by
@pupi1985 can you please tell me how can I hook on the email sending process. Then i will create a plugin with this.
by
+2
Use overrides (https://docs.question2answer.org/plugins/overrides) and override the qa_send_email() function

Please log in or register to answer this question.

...