Register Members List Search Today's Posts Mark Forums Read

Mod Options
Email Integration (New Threads/Replies by and through email!) Details »
Email Integration (New Threads/Replies by and through email!)
Mod Version: 2.6, by Cyricx (Member) Cyricx is offline
Developer Last Online: Dec 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.x Rating: (15 votes - 4.73 average) Installs: 113
Released: 31 Jan 2008 Last Update: 29 Feb 2008 Downloads: 1204
Not Supported DB Changes Uses Plugins Template Edits Auto-Template Code Changes Additional Files  

This modification allows you to mimic email lists such as yahoo groups through your forums!

Complete with the user's receiving emails for new threads and replies AND being able to reply directly from email or sending a new email to start a new thread!

Just like email lists, you will need a separate email box for EACH forum that you have this enabled for!!

After installing this modification in the forum manager you will enter the settings for each forum to connect to it's own email box.

After doing so, members can subscribe to each forum that this mod is enabled for to receive notifications for new threads and replies.

Any posts in that forum, will be sent to them via email in one of two formats that you as the administrator decide. One format has a "reply box" and is the most sure fire way of not getting excess email crap ont he forums. The second format (noted as "Old" format) keeps an email in its base pure form with some attempts at quoting messages. Examples of both are attached below.

The users can then reply to that email (which will then be processed and posted to the forums through the cron job that runs every 10 minutes), or they can send a new email to the email address and a brand new thread will be created!

Essentially mimicing an email list! Suddenly those users that hate forums, can still be dragged into the conversations and help keep the forum's activity level up!

You MUST have php imap functions enabled on your server to use this modification! You do not need to have IMAP installed, just have to enable php to use the functions by recompiling it with imap enabled!

If you are upgrading from the version
for vbulletin 3.6.x , see below!

These are the known bugs to date:
  • Unconfirmed bug that email processing does not handle Japanese characters.
Unsupported Items
These are the items that are not currently supported:
  • Some custom bbcode modifications will not display like they do on the forums in the html emails. Like glow, and the table mod.
  • Please see the file in the zip for upgrading!! If your upgrading from version 2.3.X you will need to reverse some file edits that are no longer nessecary!
  • See instructions in the zip file.
  • 2.5 Release
    • New Features
      • Email Integration now uses vbmail! This DOES require one small file edit.
  • 2.5.1 Release -
    • New Feature -
      • Added some debug triggers in the cron file. Turning on debug will stop email sfrom being deleted after they are processed and if a message errors out, the error email will be sent to an admin specified email address which is set in the cron file.
    • Bug Fixes -
      • Fixed incorrect call to plain text parsing. (this is the cause of the duplicate posting/undefined function errors)
      • Corrected security hole.
      • Corrected a typo in the error message for attachments that are too large.
      • Rebuilt the method of determining attachment types vs max size to handle more then 2 attachments. Previous code would not process more then 2 attachments.
      • Added a call to determine the parentid for replies if one isn't specified prior to the post being added to the database from emails.
      • Fixed a bug where previous messages were blank in new layout for posts that didn't have a parentid specified.
  • 2.5.2 Release
    • Bug Fixes
      • Fixed bug with new users not being automatically subscribed to forums when it is enabled for their usergroup.
      • Added a dirty regex fix for utf-8 encoded filenames.
  • 2.5.3 Release
    • Bug Fixes
      • Fixed bug that displayed "Set All Instant" on User CP Subscribe Forums page when no forums were setup for Instant Email Notification.
      • Fixed bug that allowed forums that were set inactive to appear on the User CP SUbscribe Forums page.
      • Fixed bug with the how the "New Layout" processs improving how it tries to remove the first layer of > signs in replies.
    • Improvement/Bug Fix
      • Changed the field in the Forum Manager for forum['ei_usergroups'] so that it now controls not only who can reply via email. But who can receive instant notification emails. It is now titled "Please enter the usergroup IDs that can use this feature."
      • Added the phrase "You may increase the space between the above lines as needed." to the "New Layout" email templates to alleviate user confusion.
  • 2.5.4 Release
    • Bug Fixes
      • Added a quickfix for a bug that caused a function error when replying to a thread that a user was subscribed to while in a forum that was enabled for Email Integration.
    • Error Checks Added
      • Added a function exists check to the cron file and the search settings page to warn people when they have not correctly enabled imap functions.
  • 2.5.5 Release
    • Bug Fixes
      • Added a check to subscribeforum.php to not display subscription options for forums that are links.
      • Fixed a bug that caused the cron to incorrectly list the username and signature in the emails. (The post processed to the forums were correct, it was just the emails that were screwy sometimes.)
      • Slightly modified phrase and variables for replies so that if a post has a title, it'll use that title for the email, if not, it'll use the thread title like before.
  • 2.6 Release
    • Bug Fixes
      • Joining an unmoderated public group will now auto subscribe you per the usergroup settings.
      • NO CONFLICTS with Instant Thread Subscription! See details in below post.
    • New Stuff
      • User Option Allow Auto Subscribe - This is an admin allowable, user option that let's the user choose to not be auto subscribed.
      • User Option not receive own posts - A new user option that lets them select to NOT receive their own posts via email.
      • Editted the phrase for the Auto Subscription script to tell people what to do if there are no listings.
      • Added error checks when saving a usergroup for if auto subscriptioin is entered with a forumid for a forum that does not have email integration enabled and also checks that the usergroup you are saing is entered in the forum manager as allowed to use email integration.
  • 2.6.1 Release (BETA VERSION)
    • Hot Fix
      • It appears I was unseting a variable too soon. I've corrected this and it has resolved the issue with multiple posted replies on my test server.
Most of these will be slow to make it in til I know I've got the code to handle just about every type of email we could receive But in anycase, here are the ideas for future versions!
  • End User Option to subscribe to just receive new thread emails, or receive all new thread & reply emails (current version does all new threads & replies).
Thanks to RedTyger, Bob Denny, Ed Kohwley and Chris McKeever for their additions and assistance with portions of this code.

Huge thanks also goes to the many individuals that have helped test various incarnations of this mod.

MAD PROPS TO: cgmckeever for a great quoting regex for the old format, and all the mods at for helping test version 2.4 prior to release!!

You guys rock!

Please feel free to donate to my continued work on this modification!! It let's me spend more time on it!
Make a Donation!

Version 2.6 will work with both 3.6.8 and 3.7x

Upgrading from version for 3.6.x
  • Due to using different product ID's due to the changes that will be coming up for the version for vbulletin 3.7.x you will need to uninstall the 3.6.x version and install the 3.7.x version in this thread. My apologies for the inconvienance, I've been unable to determine an alternative with the 3.6.x version still in development due to the last few bugs.
The #.X versions are the solid tested versions.

The #.X.X versions are the beta versions. New features and bug fixes will be worked in there and then when I have a solid version it'll be released as the next #.X

Thank you!!

~ Cyricx

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors


Click image for larger version

Name:	exampleemailnewformat.jpg
Views:	2519
Size:	90.0 KB
ID:	75242   Click image for larger version

Name:	exampleemailoldformat.jpg
Views:	2078
Size:	42.7 KB
ID:	75243   Click image for larger version

Name:	examplesubforum.jpg
Views:	1819
Size:	26.2 KB
ID:	75913  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Major Additions Email Integration (New threads/replies by email) Cyricx vBulletin 3.6 Add-ons 1069 24 Mar 2014 23:44

Old 31 Jan 2008, 13:46
soletrader soletrader is offline
Join Date: Jul 2006
Where are the files?
Reply With Quote
Old 31 Jan 2008, 13:47
Cyricx Cyricx is offline
Join Date: Sep 2002
Beat me to the punch!

They are uploaded now!

  • How do the emails work?
This is a basic rundown of how the emails work..

When a new thread is created on the forum, plugins check for the email integration settings and then send an email out to everyone that has subscribed to that FORUM for instant email notification.

When a new reply is added to a thread, the plugins check to see what forum that thread is in, and then if that forum has email integration settings, and then sends an email out to everyone that is subscribed to that FORUM for instant email notification.

The cron job does the processing of the emails.

It checks your forums for email integration settings and then connects to each of the mailboxes one at a time. Pulls all the messages out, decodes them, cleans them up, checks for errors etc.

To determine who the user for the email is it checks the email header for who it came from. If you have strict email turned on, it grabs the username and then verifies what domain sent the email. If you have strict email turned off, it just grabs the email address of the person that sent the email. Note: this can be easy to fake.

O.. and yahoo mailing lists... do not use strict email checking. You can post as just about anyone you want in seconds from microsoft outlook

It then checks the "in_reply_to" in the message header. This should contain a predefined group of characters that let's us know it's a reply and assigns the post to the correct thread and parentid. Some virus scanners change this so in the subject line of reply emails is the threadid number. We check for that next as a backup If it doesn't match either of these criteria, it's classified as a new thread.

If it is determined that the email is a reply, it uses the datamanager to send the reply and uses the plugins to send out the emails.

If it is a new thread, then it uses the datamanager to post the new thread and uses embedded code in the file to send the email.

It then flags the message to be deleted and before closing each mailbox, expunges all marked messages from it. (Just incase an email came to the box after it had grabbed the list, this way one doesn't get lost! )

So the only time you'll get an email when you run the cronjob is when it is grabbing an email

Additionally, manually running the cron job will sometimes cause the quote boxes to not appear in the mailbox. This is due to the bbcode_quote template not being cached in the admincp
  • Error - Undefined Function
If you get the error the below error you will need to enable IMAP support on your server. If you host your own server, check your php.ini file, the line for imap support will be commented out. If you do not host your own server, request your host to enable this.
  • Fatal error: Call to undefined function: imap_open() in
    /*****/includes/cron/emailintegration.php on line XXX
To verify if you have IMAP installed go to your admincp -> Maintence -> View Php Info and you should see something like this:

additional .ini files parsed /etc/php.d/imap.ini,



IMAP c-Client Version 200X

To correct this problem you will need to have the php.ini file recompiled with IMAP functions enabled -

You do not need to have IMAP installed, but if you wish to also install IMAP, instructrions for doing so can be found here -
  • Error - Couldn't open stream
If you get this error while manually running the cron job (suggested to do the first time to be sure it's running right!)

imap_open() [function.imap-open]: Couldn't open stream

Your connection type setting for one or more of your forums are incorrect. I suggest only setting up one forum the first time. Edit that forum, and try one of the other 6 connection types. Then rerun the cron. It's a trial and error if you do not know how your server is setup. Some people use IMAP, some POP3 and others still use POP3 with Official Certificate, so try all 6.
  • Can I use a Gmail account to pull the emails from?
You most certainly can.

Login to your mailbox at gmail, go to Settings -> Forwarding and POP/IMAP

Enable POP for the account, either from here on, or for all mail. Be sure to select archive or delete for what to do after the messages are downloaded. Otherwise the system will continue to repost the emails!!

In your forummanager use the folowing settings:

email address to reply to: [email protected]
username: [email protected]
password: password
Type of connection: select "POP3 with SSL (Self signed certificate)"

  • Smilies don't show up in html emails!
Images are stored in html files with the url for the location of the image. Edit your smilies in the smilie manager and give them all the true url of the image location. For example instead of /smilies/smilie.gif change them to

That will allow them to show up correctly in email.

How does it work with Thread Subscriptions?
This plugin does NOT change how thread subscriptions work. You get the same emails, same format for thread subscriptions.

It just adds an option to instant subscribe to the forum and those emails you can reply to.

However... it does have a series of checks to be sure that these two don't conflict. Here's a fairly concise list of how this plugin integrates with the subscribe thread function.

When an email reply is processed, it checks if user's are subscribed for instant notification for the forum AND the thread.
  • If they are, it removes their subscriptions to the thread and sends them a forum email.
  • If a user is only subscribed to the forum, then they get the forum email.
  • If a user is only subscribed to the thread, they get vbulletins default thread email.
When a reply is posted on the forums for a forum that email integration is turned on for, it runs the same checks as above.

Additionally, if a user has it setup to be instantly subscribed to all threads they reply to it checks then to see if they are subscribed to the forum. If they are, it doesn't allow the system to also subscribe them to the thread.

If a user tries to subscribe to a thread for instant notification for an EI Enabled forum and they are also subscribed for instant notification to the forum, it'll give them an error. However, they may still subscribe to the thread for daily or weekly updates while still having instant notification to the forum.

Is that confusing enough?? Trying writing the code for it!
Cyricx (Chris)

Last edited by Cyricx; 22 Feb 2008 at 19:03.
Reply With Quote
Old 31 Jan 2008, 15:45
ssslippy's Avatar
ssslippy ssslippy is offline
Join Date: Jan 2006
Supper mod, Nominated
Immortal Guild - My Guilds Website
Reply With Quote
Old 31 Jan 2008, 16:44
Cybertims Cybertims is offline
Join Date: Nov 2005
Real name: Paul
Fatal error: Call to a member function query_first_slave() on a non-object in C:\xampp\htdocs\global.php on line 247

Any clues as to this error? I get that when I run the cronjob.

Reply With Quote
Old 31 Jan 2008, 16:53
Cyricx Cyricx is offline
Join Date: Sep 2002

I suspect the issue is with the file edit. Please be sure you have followed the file edit needed in the /includes/class_mail.php file.
Cyricx (Chris)

Last edited by Cyricx; 31 Jan 2008 at 17:00.
Reply With Quote
Old 31 Jan 2008, 17:02
Cybertims Cybertims is offline
Join Date: Nov 2005
Real name: Paul
Originally Posted by Cyricx View Post

I suspect the issue is with the file edit. Please be sure you have followed the file edit needed in the /includes/class_mail.php file.
Yup, the edit is there and just the way it should be......
Reply With Quote
Old 31 Jan 2008, 17:12
Triky's Avatar
Triky Triky is offline
Join Date: Mar 2007
Location: [Italy]
I will try it!
I'm italian, I am learning english.. so, please, if you see any errors in my grammar or spelling, let me know via PM. Danke!
Reply With Quote
Old 31 Jan 2008, 17:41
Cyricx Cyricx is offline
Join Date: Sep 2002

I've removed the references to _slave in the queries in some of the plugins and the /includes/cron/emailintegration.php file.

Please reimport and overwrite with the xml included in this zip and overwrite the /includes/cron/emailintegration.php file.

If that doesn't resolve your issue let me know and we will take a closer look at things
Cyricx (Chris)

Last edited by Cyricx; 31 Jan 2008 at 18:47.
Reply With Quote
Old 31 Jan 2008, 17:45
Cybertims Cybertims is offline
Join Date: Nov 2005
Real name: Paul
Interesting, but even though that error happens when I manually run the cron, the system still works and everything posts ok on the Forum and emails go out ok.

Will try this new xml file as well.....

Reply With Quote
Old 31 Jan 2008, 17:48
Cyricx Cyricx is offline
Join Date: Sep 2002
Right on, remember to upload the new cron file too.

My 2.4 code made some query references to the slave database. I suspect that you have different settings then those running on 3.6 that have upgraded so far
Cyricx (Chris)
Reply With Quote
Old 31 Jan 2008, 18:48
Cyricx Cyricx is offline
Join Date: Sep 2002
Found the error in the cron file

New zip attached.

Mah bad... trying to help someone figure out a way to setup a system cron to run the file instead of waiting for vbulletin
Cyricx (Chris)
Reply With Quote
Old 31 Jan 2008, 20:50
popmyzit popmyzit is offline
Join Date: Jun 2006
Hey Cyricx,
just installed. thanks for the great work!!

Got error going to maintenance email area with mysql error:
Database error in vBulletin 3.7.0 Beta 4:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Old 31 Jan 2008, 20:57
Cyricx Cyricx is offline
Join Date: Sep 2002
Please go to your Usergroup Manager and be sure that you have entered in a forumid for the usergroups that you wish to enable auto subscriptions for.

In version 2.4 you could actually turn on auto subscription for a usergroup and not enter in the forumids. This would spiral to a few other errors such as the one you mentioned above

2.5 will not allow you to not enter in a forumid if you are turning on auto subscription. So I'm fairly certain that when you installed 2.4 that mistake was made.

I've put in a safety net to ensure that fumble isn't made with these versions going forward
Cyricx (Chris)
Reply With Quote
Old 31 Jan 2008, 21:13
popmyzit popmyzit is offline
Join Date: Jun 2006
Hello Cyricx,
also when registering I still get:

Database Error Database error
The Forum database has encountered a problem.
Please try the following:

* Load the page again by clicking the Refresh button in your web browser.
* Open the home page, then try to open another page.
* Click the Back button to try another link.

The forum technical staff have been notified of the error, though you may contact them if the problem persists.

We apologise for any inconvenience.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 02:21.

Layout Options | Width: Wide Color: