![]() |
HTML welcome-email code
I’m trying to make a plugin that will enable an HTML ‘welcome email’ when a user signs up. The problem seems to be that the $headers string is set to 'Content-Type: text/plain' and it needs to be 'Content-Type: text/html'.
There are already plugins that let admins send HTML emails to users that use this code to get around the problem: Code:
I will of course bundle it up into a plugin for everyone to use once it is complete. --------------- Added [DATE]1299104905[/DATE] at [TIME]1299104905[/TIME] --------------- Update: Okay I've made some progress. The problem appears to be with the conditional which only works for adminCP emails sent from "users --> send email to users". Code:
if ($vbulletin->userinfo['usergroupid'] == 6) So long story short... I need an additional condition that figures out whether this is the 'welcome email' or some other email. Then I can plug it in like this; Code:
if ($vbulletin->userinfo['usergroupid'] == 6 || welcomemail_conditional == true) --------------- Added [DATE]1299145970[/DATE] at [TIME]1299145970[/TIME] --------------- Further update: I have made a solution that works for me, but which isn't dynamic enough to be packaged into a plugin that will work for everyone. What you need to do is set your $vbphrase[welcomemail] phrase to something specific, like "Thanks for joining Sitename". Then edit the code below as needed: Code:
if ($vbulletin->userinfo['usergroupid'] == 6 || $subject == 'Thanks for joining Sitename')
|
any indication of what file this needs to be added to so we can allow html emails with the welcome msg and in turn add a logo image.
Thanks |
It isn't a file modification, its a plugin. So you need to go to plugin manager, add new plugin, and use the hook "mail_send". Hope that helps and is accurate. :)
|
All times are GMT. The time now is 11:38 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|