Hi,
Can anyone help with this?
I would like to be able to add graphic banners or images in the outgoing welcomemail body sent to new registrants on the vBuleetin forum...

Any ideas appreciated...
Regards.

Dani AI

Generated

's idea is exactly the typical request for vBulletin 3.x: the forum sends plain-text emails by default, so adding banners/images requires sending HTML (or a multipart/alternative message with a text fallback). 's pointers to the Community Bulletin plugin and the admin-panel HTML-email hack are the usual community routes because they change the mail routine or headers so messages are sent as HTML. Those are good starting points — verify version compatibility and back up everything before installing any hack.

Practical approach: keep your message copy in the Admin CP email templates for easy edits, but remember templates alone do not change the Content-Type header. You either install a maintained HTML-email plugin or modify the vBulletin mail routine to add HTML headers and an HTML body. A minimal PHP example (generic) shows the header changes you need:

$to = $user_email;
$subject = 'Welcome to ForumName';
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=UTF-8\r\n";
$headers .= "From: ForumName <noreply@yourdomain.com>\r\n";

$message = '<html><body>'
         . '<div style="max-width:600px;font-family:Arial,sans-serif;">'
         . '<img src="https://yourdomain.com/images/welcome-banner.jpg" alt="Welcome" style="width:100%;max-width:600px;">'
         . '<p>Thanks for joining...</p>'
         . '</div></body></html>';

mail($to, $subject, $message, $headers);

In vBulletin you should hook into the vB mail function instead of calling mail() directly so sending integrates with user data and queueing.

Quick checklist and cautions: host images with absolute HTTPS URLs; use inline CSS and keep layout ~600px wide; include meaningful alt text; supply a plain-text alternative for clients that strip HTML; test across Gmail, Outlook and mobile clients; ensure SPF/DKIM and a valid From address to avoid spam filters; test on a staging copy and keep notes on any core-file changes so upgrades do not break the hack. This complements 's suggestions with a concrete header example and practical deliverability/design tips.

Recommended Answers

All 2 Replies

This is a great idea- I was actually thinking about how to do that today, since I never actually got around to checking it out.

Thanks so much for the reminder. Tomorrow when I'm not exhausted I'm definitely going to do that!!! :)

By default, vBulletin is only capable of sending out plain text emails. You will need to hack your vB in order to get it to send out pretty print emails.

The first thing you might be interested in, for vB 3.5, is the Community Bulletin plugin: http://www.vbulletin.org/forum/showthread.php?t=66334

The other is a hack which lets you send HTML emails from wthin the admin control panel: http://www.vbulletin.org/forum/showthread.php?t=99910

Good luck!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.