View Full Version : Major Additions - Email Integration (New threads/replies by email)
Cyricx
07-01-2007, 10:00 PM
This mod is based off of the Mail Reply (https://vborg.vbsupport.ru/showthread.php?t=68113) modification by Colin F to which I have obtained permission to rewrite and release.
This modification allows you to mimic email lists such as yahoo groups through your forums!
After installing this modification you will have new settings in your forum manager where for each forum you can enable this modification and setup a separate email address to use for each forum that you have this enabled for.
Just like how there is a separate email address for each yahoo group.
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. (Example email 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!
BUGS!
These are the known bugs to date:
Confirmed 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.TO UPGRADE
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!NEW INSTALL
See instructions in the zip file.VERSION HISTORY!
(See the file in the zip for a complete history!)
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 www.4winmobile.com (http://www.4winmobile.com/) 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! (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=cyricx%40campgaea%2eorg&item_name=Email%20Integration%20Donation&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8)
Version 2.6 will work with both 3.6.8 and 3.7!
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
Cyricx
07-02-2007, 08:25 PM
FAQ
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 FunctionIf 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 XXXTo 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,
OR
imap
IMAP c-Client Version 200X
To correct this problem you will need to have the php.ini file recompiled with IMAP functions enabled -
http://us.php.net/manual/en/ref.imap.php
You do not need to have IMAP installed, but if you wish to also install IMAP, instructrions for doing so can be found here -
http://us.php.net/imap
Error - Couldn't open streamIf 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: username@gmail.com
hostname: pop.gmail.com
username: username@gmail.com
password: password
Type of connection: select "POP3 with SSL (Self signed certificate)"
Done!
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 http://www.yourdomain.com/forum/images/smilies/smilie.gif
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! ;)
Funboy
07-02-2007, 08:51 PM
Look forward to your more stable version Cyricx as think this may well work for my forum. I like the idea so will watch this one grow in version number ;)
Sounds like a great start well done.
Funboy
scottct1
07-02-2007, 11:13 PM
I wonder how this would work for us with vBseo. :)
Looking forward to seeing this one with the bugs fixed. :D
txspaderz
07-03-2007, 12:07 AM
This is a great idea! I'm looking forward to see'ing this out of beta!
dope15gd
07-03-2007, 01:05 AM
this is an awesome idea for my mobile users. I will try this out on my test board in the next few days and report back
nexialys
07-03-2007, 01:15 AM
will need a link in the foot of the email to disable subscription of threads...
this is great tool.... thanks!
subnet_rx
07-03-2007, 01:22 AM
I like this idea too, I've always wanted to do this for text messages.
Doug Nelson
07-03-2007, 01:56 AM
I've been waiting for something like this for some time. Hope development goes smoothly.
I need this! :)
once it became stable.
shortbus1662
07-03-2007, 04:25 AM
awesome!
ChurchMedia
07-03-2007, 06:31 AM
Wow -- I'll be keeping my eye on this! Thanks for working on it! :)
projectego
07-03-2007, 10:39 AM
Awesome! Thank you very much! :D
Great idea! :) Will be keeping an eye on this.
Cyricx
07-03-2007, 11:23 AM
will need a link in the foot of the email to disable subscription of threads...
this is great tool.... thanks!
Great idea! I'll be workin on those templates some while I work on the format of the emails that are posted and the blank bug. I'll add that in :)
I'm also going to add a little blurp that says "You may also start a new thread by sending an email to $foruminfo[ei_replyaddress]." :)
radarhunter
07-03-2007, 05:08 PM
EXCELLENT man
when do you think it`ll be out of it`s beta stage i`m dying to try this hack :)
Cyricx
07-03-2007, 05:16 PM
It depends alot on how much time I have to work on it. I've been drilling it pretty religiously all day and got alot more accomplished. :)
Hoping for a few donations that will continue to fund time spent on this. Regardless of that though, I'll continue to hammer on it :)
I can't really offer an ETA due to that though, but I'm sure as you all watch my progress with the betas as they roll out, you'll see this is a definate passion to get released as I think this is a core function that should be included in vbulletin. :)
COBRAws
07-03-2007, 07:29 PM
damn right man!!
Big-K
07-03-2007, 10:46 PM
Cant wait!!
edenx
07-04-2007, 01:50 AM
It depends alot on how much time I have to work on it. I've been drilling it pretty religiously all day and got alot more accomplished. :)
Hoping for a few donations that will continue to fund time spent on this. Regardless of that though, I'll continue to hammer on it :)
I can't really offer an ETA due to that though, but I'm sure as you all watch my progress with the betas as they roll out, you'll see this is a definate passion to get released as I think this is a core function that should be included in vbulletin. :)
Excellent!
AzzidReign
07-04-2007, 01:16 PM
This is a great idea, but I'd rather have the people coming back to my site to reply to threads in hopes that another thread title will catch their attention and to get them more active on my site.
FleaBag
07-04-2007, 07:28 PM
This is fab, and there is one thing that will turn this to another level IMO.
Would it be possible for this to receive email attachments (images) and attach them to the new posts? This would allow anyone with an MMS phone to email their Media Message to the forums/site e.t.c.
Keep up the good work, thanks!
Cyricx
07-05-2007, 02:25 AM
This is fab, and there is one thing that will turn this to another level IMO.
Would it be possible for this to receive email attachments (images) and attach them to the new posts? This would allow anyone with an MMS phone to email their Media Message to the forums/site e.t.c.
Keep up the good work, thanks!
This is planned for the next few betas after I've got some bugs fixed. I plan on having a global on/off for accepting attachments and a on/off for accepting all attachment types (for example, for forwarded emails) or restricting it to only allowed image types like images :)
This is a great idea, but I'd rather have the people coming back to my site to reply to threads in hopes that another thread title will catch their attention and to get them more active on my site.
True.. the problem that we as forum lovers run into is that there are many people that due to evil work environments can only access email during the day and rarely check anything else. This is the group that LOVES mailing lists and email groups. We are missing out on a whole nother level of interaction in users with this group. If we can bring these people into the fold as well, then we increase the posts on the forums, the stuff to read, and likely convert a few of those mailing list lovers to forum readers :)
quiklink
07-05-2007, 06:00 AM
Eagerly awaiting this mod to reach a stable point!
henrikhansen
07-05-2007, 01:22 PM
True.. the problem that we as forum lovers run into is that there are many people that due to evil work environments can only access email during the day and rarely check anything else
So true, content is king, and if people can post in working hours by replying emails,
forum activity will certainly increase. Furthermore, the awareness of the existence of
the forum will increase.
Cyricx
07-06-2007, 02:53 PM
The next beta version will be released soon. It looks like I was actually able to totally remove the file edits! :)
I'm working on a new width bug I found with the messages, and then I'll work on the usergroup bug. The usergroup is the big one, but if the messages look like crap, it hardly matters how well it works ;)
Just wanted to give you all an update :)
raiderlax
07-07-2007, 07:42 AM
This looks sweet, please get this out of BETA, please :)
tokenyank
07-08-2007, 04:22 PM
subscribed!
Something this big, I don't wanna use beta! ;)
Bob Ricci
07-08-2007, 11:50 PM
That's a great thought. But in practice we lose a lot of visitors to Yahoo Groups because they like getting emails and they reply to the email. I am waiting for this hack to be completed and I will donate to the cause.
This is fab, and there is one thing that will turn this to another level IMO.
Would it be possible for this to receive email attachments (images) and attach them to the new posts? This would allow anyone with an MMS phone to email their Media Message to the forums/site e.t.c.
Keep up the good work, thanks!
Cyricx
07-09-2007, 02:20 AM
Thanks for the support gang :)
I haven't released the next beta yet as I'm hoping to jump straight to a solid version. I've fixed both the blank bug, and the quote boxes, as well as I have recoded almost all of the code that I had permission from RedTyger to use.
I'm left with Attachments and Forum Permissions. Attachments should be quick and easy. The share class file that I'm using (same one that Colin used) already pulls out the attachments from the message, so I just need to add a few catches in there for those that don't want to allow attachments and for those that want to restrict the type of attachments :)
Getting close!!
mee88
07-09-2007, 05:38 AM
Great idea >>>> you are great }}}}} waiting for ur final release :)
rustybones
07-10-2007, 03:00 AM
I am definitely going to be watching this with great interest, I can't wait for the stable version!
hmmm i will be watching this it goes final! good work! :)
Talisman
07-10-2007, 03:22 AM
Thank you so much for developing this feature. My past online communities formed originally from mail lists -- ONElist which became eGroups which preceded Yahoo Groups. Once we outgrew the free sites, I bought my vBulletin license and it's been online forums ever since.
I really miss being able to hang out on my own machine without being tied to a browser page -- while getting immediate messages (or daily/weekly digests) and sending out immediate replies right there in my inbox (without having to go to the site all the time). BUT I still want to have an online forum/community to visit too. It'll be great to offer both forms of interaction for my membership so it would better cater to each individual's preferred method.
Thanks again.. this is an excellent idea.
fxs158
07-10-2007, 11:19 AM
great idea looking forward to it
Tralala
07-10-2007, 02:01 PM
This is one of the first mods in a while to actually make me DROOL.
I seriously cannot WAIT to see this in action!
I have a forum that has migrated recently from a Yahoo! mailing group ... and participation is down. These folks, for whatever reason, were more comfortable with the "push" email interaction, and haven't taken the initiative to actually visit the forum on their own. It's an uphill battle, and now they're all asking why we made this switch in the first place. This mod would give us the best of all worlds, it seems!
I will certainly donate when it's made available.
rustybones
07-12-2007, 12:37 AM
Yeah we're going through the exact same transition, trying to move users from a mailing list to a forum and have some users in rather remote areas.
For example one user lives in Yap, Micronesia and only has 10 hours internet access a month, so this product would be IDEAL for what we need!
Waiting with great anticipation!
Cyricx
07-13-2007, 11:09 AM
Just to give everyone an update.
My current build has all known bugs resolved. I'm currently workin on the attachment code. I'm bustin on this pretty hard to get a non-beta version released :)
I actually dreamed about php code last night :eek:
Tralala
07-13-2007, 02:56 PM
Cyricx... just wanted to chime in with encouragement. I can't tell you how excited I (and my forum's members) are about the prospect of this mod. Comes at such a great time, too, since they're struggling with the transition from a Yahoo! mailing list. Your work could solve so many problems and really bridge a gap that vBulletin has had for a long time now.
So, thanks.
tekguru
07-15-2007, 10:58 AM
Well a donation sent from me to
tekguru
07-15-2007, 11:00 AM
Well a donation sent from me to help spur the coding on!
Will be superb to get this working. I only hope it suports both forum and usergroup permissions as I'd only be wanting to use it on some forums and for some usergroups.
Plus I hope that posting via email will be easy to do!
Good luck with the development!
Just to give everyone an update.
My current build has all known bugs resolved. I'm currently workin on the attachment code. I'm bustin on this pretty hard to get a non-beta version released :)
I actually dreamed about php code last night :eek:
wow it looks like an RC now? LOL :)
Raven34
07-16-2007, 03:24 AM
Well this looks exactly like what im needing for our site as well. I would like to move our group from yahoo over to our forum site and this would be absolutely ideal. Looking forward to a full release.
Thanks for the hard work.
Raven
Cyricx
07-16-2007, 11:31 AM
The RC should be released today or tomorrow. I'd put money on today :)
I just need to code the checks for attachment extensions :)
capsize
07-17-2007, 06:43 AM
The RC should be released today or tomorrow. I'd put money on today :)
I just need to code the checks for attachment extensions :)
Awesome!!! I'm waiting anxiously for the RC. We're in the process of transitioning from Yahoo! to vB and several of the regular posters have been complaining about not being able to use email to read/post messages in vB. This is a badly needed feature in vB and I'm so happy that you've taken on the task of implementing it.
Cyricx
07-17-2007, 01:43 PM
The RC version is out!!!
*braces for the flood*
txspaderz
07-17-2007, 01:44 PM
Oh Yea... Rc Baby!!!
radarhunter
07-17-2007, 02:06 PM
sorry if i`m sounding like a no0b but does RC means the full version is out
and we can test it on a live board ?????/
Cyricx
07-17-2007, 02:08 PM
Yes it means that all known integrity issues are solved.
But PLEASE backup your database as always before doing any modifications.
I've had a very limited number of beta testers. So I would suggest installing it, sending a few emails yourself, replying etc and playing around with it before you let your users know it's up and going :)
Tralala
07-17-2007, 02:29 PM
How does this system know who to set as the poster of new threads and replies? Does it match username to the sender's email address?
Cyricx
07-17-2007, 02:51 PM
Correct. It users the sender's email to get the userinfo :)
Then compares their usergroups to the array of usergroups that are allowed to post via email to that forum. :)
funkmeister
07-17-2007, 04:48 PM
Correct. It users the sender's email to get the userinfo :)
What happens if there's a mismatch? Someone emails from their work email address but forum has there home email defined in their profile? Does it choke this thing or is it posted as Guest or somesuch alternative?
Also, anyone using this successfully on 3.6.5?
Thanks, great job.
Cyricx
07-17-2007, 04:52 PM
It sends them an error message.
You can't have it post as guest... otherwise if a spam bot gets ahold of the email address your looking at a helluva lot of posts :)
Those who are familiar with mailing lists will know that you have to set one specific email address as the one your emailing from. :) So this will not be an alteration to what they are used to :)
Also, note that the person's email address is hidden in the emails that are sent out. Unlike yahoo where everyone on the list sees your email address :) So your users maintain the complete email address security that vbulletin offers even using this modification :)
quiklink
07-17-2007, 05:05 PM
Got this error while trying to create a new forum and setting the Email Integration options. From looking at the database it looks like the ei_active column isn't being created.
Invalid SQL:
INSERT INTO coti_forum
(title_clean, title, description_clean, description, link, displayorder, parentid, daysprune, defaultsortfield, defaultsortorder, showprivate, newpostemail, newthreademail, options, styleid, password, ei_active, ei_replyaddress, ei_hostname, ei_username, ei_password, ei_connectiontype, ei_usergroups, gfpoforumoptions)
VALUES
('Mailing List', 'Mailing List', 'Test forum for mailing list integration', 'Test forum for mailing list integration', '', 1, -1, -1, 'lastpost', 'desc', 1, '', '', 97990, 0, '', '1', 'maillist@*****.com', 'mail.*****.com', 'maillist@*****.com', '012345', '0', '6', 0);
MySQL Error : Unknown column 'ei_active' in 'field list'
Cyricx
07-17-2007, 05:15 PM
Please download 1.1 and upload the new product.xml file.
quiklink
07-17-2007, 05:18 PM
Please download 1.1 and upload the new product.xml file.
Hehe ok, I had fixed it here by adding the field to the database manually.
Cyricx
07-17-2007, 05:21 PM
Yeah, I had left it off the product file :(
I'm using the version fields in the product xml to keep things smooth :)
But I'm also using the hide error so you won't get a burp when you do a future version even if you added it manually :)
quiklink
07-17-2007, 05:23 PM
So this will send out copies of post to the specified forums to everyone in the usergroups allowed to use the mod? Or can member choose to not receive the emails?
Cyricx
07-17-2007, 05:27 PM
They have to subscribe to the forum, just like they had to with RedTyger's modification :)
When they go to subscribe to the forum there is a new option for "Instant Notification by Email".
This way people that hate mailing lists don't have to mess with them, but those that want it, can select it :)
That option will only show up for forums that have the email integration activated. Other forums will show just the usual forum subscription selections.
quiklink
07-17-2007, 05:35 PM
Excellent! Testing it out right now. If all goes well I'll open it up to a larger group on our forums to test further.
quiklink
07-17-2007, 05:58 PM
Ok having a problem with the cron job. Getting this error:
Fatal error: Call to undefined function: imap_open() in
/*****/includes/cron/emailintegration.php on line 70
But the forum is set for POP3 not IMAP
Cyricx
07-17-2007, 06:02 PM
Ask your host to enable IMAP.
If you host your own server, check your php.ini file and be sure that extension=php_imap.dll is not commented out.
I've never worked with a server yet that didn't have it enabled, so I didn't even consider that possibility :)
Renada
07-17-2007, 06:03 PM
Hi Cyricx,
Please could you clarify which template the second edit should use? In the instructions you've left off the template name :)
Find In: (blank)
<td><img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" /></td>Thanks very much for your help :)
Regards,
Renada
quiklink
07-17-2007, 06:09 PM
Ask your host to enable IMAP.
If you host your own server, check your php.ini file and be sure that extension=php_imap.dll is not commented out.
I've never worked with a server yet that didn't have it enabled, so I didn't even consider that possibility :)
*sigh* Time to find a new host...
Cyricx
07-17-2007, 06:09 PM
Bugger! This is why I was hoping for more to check it out during beta ;)
It's the
Postbit Templates -> postbit_attachment
I'm updating the install instructions now :)
Cyricx
07-17-2007, 06:10 PM
*sigh* Time to find a new host...
No, you won't need a new host :)
Most hosts will not have any issues at all with enabling IMAP :) Like I said, I have yet to encounter a host that didn't have it enabled. :)
All they have to do is uncomment one line and recompile the php. Pretty quick and painless :)
Renada
07-17-2007, 06:20 PM
Bugger! This is why I was hoping for more to check it out during beta ;)
It's the
Postbit Templates -> postbit_attachment
I'm updating the install instructions now :)
LOL! Thanks and thank you for this mod, my members will love it! I'm glad it's not only me that has a senior moment. :)
Regards,
Renada
txspaderz
07-17-2007, 06:34 PM
I can't find the "email integration" under Vbulletin Options... ?
Cyricx
07-17-2007, 06:38 PM
I can't find the "email integration" under Vbulletin Options... ?
I just confirmed it's in the product xml.
It will likely be the last one in your list of setting groups.
Please try to look again, or click "Show All Settings" and then do a ctrl-f for "Email Integration".
Most likely you have so many modifications installed, your looking right over it in the shuffle of options :)
txspaderz
07-17-2007, 06:41 PM
Getting this error message now when trying to view a thread in the integrated forum
Warning: Cannot modify header information - headers already sent by (output started at /home/setxapa2/public_html/forum/showthread.php:1) in /includes/functions.php on line 2785
Renada
07-17-2007, 06:43 PM
I just confirmed it's in the product xml.
It will likely be the last one in your list of setting groups.
Please try to look again, or click "Show All Settings" and then do a ctrl-f for "Email Integration".
Most likely you have so many modifications installed, your looking right over it in the shuffle of options :)
Hi Cyricx,
Same here, I can't find it either. You're welcome to an admin account to check it out if you need to :)
Regards,
Renada
Cyricx
07-17-2007, 06:44 PM
Please PM me a login Renada :) Thank you!!
Renada
07-17-2007, 07:15 PM
Please PM me a login Renada :) Thank you!!
PM sent :)
Cyricx
07-17-2007, 07:22 PM
Fixed the options error. The export wasn't grabbing them... hehe. Tested the install of the options on one of my sister boards as well as on TXS, just grab the new zip and upload the new xml.
I'm currently working with TXS to determine this header problem he's having. I think it might be tied to an older version of php.
quiklink
07-17-2007, 07:37 PM
No, you won't need a new host :)
Most hosts will not have any issues at all with enabling IMAP :) Like I said, I have yet to encounter a host that didn't have it enabled. :)
All they have to do is uncomment one line and recompile the php. Pretty quick and painless :)
Don't I wish...They won't change it, already checked. I need to switch hosts anyway, current host just isn't cutting it. All in all pretty good as far as reliability goes, but they won't adjust their configurations for anything and have too many limits on those they do have enabled.
Cyricx
07-17-2007, 08:29 PM
Okay TXS's header info problem was due to the file edit for the showthread.php not being in the correct spot.
Please double check yourself CAREFULLY! The query your editting appears twice I believe and the last line is the only thing that is different.
I have to do some driving tonight and won't be back for about 5 hours... but I'll update the install instructions to try to make things more clear tonight or tomorrow morning :)
Also, their appears to be an issue with it not working correctly with the EZBounce modification. I'm reviewing that mod as well to determine what issue is occuring :)
So...
Download the latest zip, make sure you do the file edits right.
Subscribe to the forum.. not the thread..
and you should be all good to go! :)
Renada
07-17-2007, 08:38 PM
Fixed the options error. The export wasn't grabbing them... hehe. Tested the install of the options on one of my sister boards as well as on TXS, just grab the new zip and upload the new xml.
I'm currently working with TXS to determine this header problem he's having. I think it might be tied to an older version of php.
Hi,
I'm not too sure what I should put for "Hostname for the above email". Would I need to ask my host for this?
Also, when running the cron job in Task Manager I get this error
Email Integration
Warning: imap_open() [function.imap-open (http://thinkstop.com/community/boards/admincp/function.imap-open)]: Couldn't open stream {localhost:110/pop3/notls}INBOX in /includes/cron/emailintegration.php on line 70
Warning: imap_headers(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 73
Warning: imap_close(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 799
Warning: imap_open() [function.imap-open (http://thinkstop.com/community/boards/admincp/function.imap-open)]: Couldn't open stream {mysite.com:110/pop3/notls}INBOX in /includes/cron/emailintegration.php on line 70
Warning: imap_headers(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 73
Warning: imap_close(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 799
Done
Could you please tell me what I've done wrong here? :)
Admin account is still valid if you need it.
Thanks,
Renada
txspaderz
07-17-2007, 08:41 PM
Hostname should be the mail server address.
Renada
07-17-2007, 08:50 PM
Hostname should be the mail server address.
Duhh!! Thank you TXS :)
Regards,
Renada
Cyricx
07-17-2007, 08:50 PM
Also toy with the connection type.
If your not certain of your exact server settings you may have to try each of the 6 settings to find the magic one ;)
For example, mine uses "IMAP".
Also as txspaderz mentions, try mail.yourdomain.com
Renada
07-17-2007, 08:52 PM
Hi Cyricx,
I'm now getting this error when running the scheduled task.
Email Integration
Fatal error: Call to undefined function: htmlspecialchars_decode() in /home/sites/thinkstop.com/public_html/community/boards/includes/cron/emailintegration.php on line 130
Any ideas what is causing this? I think this is what is now stopping me receiving an email notification.
Regards,
Renada
Cyricx
07-17-2007, 08:56 PM
On line 130 of the emailintegration.php find:
$title = htmlspecialchars_decode($title);
and change it to
// $title = htmlspecialchars_decode($title);
It appears that those running an older version of php do not have that function defined. Tonight when I work on one of the preg_replaces for outlook emails I'll also look for a function that will work better with older versions to remove the html stuff.
without the decode a title with & will come up as amp;&
Can you confirm if you are running php 4.x?
Be back in 5 hours!!!
Please test it and let me know what you find!! I'll be working furiously smashing squashing and demolishing any issues!! :D :D
Renada
07-17-2007, 09:50 PM
On line 130 of the emailintegration.php find:
$title = htmlspecialchars_decode($title);
and change it to
// $title = htmlspecialchars_decode($title);
It appears that those running an older version of php do not have that function defined. Tonight when I work on one of the preg_replaces for outlook emails I'll also look for a function that will work better with older versions to remove the html stuff.
without the decode a title with & will come up as amp;&
Can you confirm if you are running php 4.x?
Be back in 5 hours!!!
Please test it and let me know what you find!! I'll be working furiously smashing squashing and demolishing any issues!! :D :D
Hi Cyricx,
Ok fixing the special characters gave me back the following error message:
Email Integration
Warning: imap_open() [function.imap-open (http://thinkstop.com/community/boards/admincp/function.imap-open)]: Couldn't open stream {mysite.com:110/pop3/notls}INBOX in /includes/cron/emailintegration.php on line 70
Warning: imap_headers(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 73
Warning: imap_close(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 799
Done
That mentions pop3 in the error but I've got it as IMAP in the settings - could it be that it wants pop3 instead?
PHP version is 4.4.7
Hope this helps and will provide a stronger hammer for smashing and demolishing if needed :)
Regards,
Renada
Renada
07-17-2007, 10:42 PM
Hi Cyricx,
I'm receiving Email notifictions from the forum that I've enabled this in but every time I reply to one I get the following message:
Dear Unregistered User,
We're sorry, but for the reason stated below we could not process your e-mailed reply.
The error that occurred was:
Message too short: your message does not have the required minimum amount of characters.
Sorry,
Web Team
Not sure why it's saying "Unregistered User" as this is posted in a Staff only forum. What is the required minimum amount of characters? It's not pulling this from my forum settings as I deliberately posted an lengthy reply to see if I'd still get this error.
Curiouser and curiouser :)
Regards,
Renada
shortbus1662
07-17-2007, 11:09 PM
I can't wait until I can reply to email alerts like the one I just got about this topic via email haha!
Throw in an advertisement in the email alerts that go out and cha ching!
I'm very excited about this thing!
txspaderz
07-17-2007, 11:41 PM
Hi Cyricx,
I'm receiving Email notifictions from the forum that I've enabled this in but every time I reply to one I get the following message:
Dear Unregistered User,
We're sorry, but for the reason stated below we could not process your e-mailed reply.
The error that occurred was:
Message too short: your message does not have the required minimum amount of characters.
Sorry,
Web Team
Not sure why it's saying "Unregistered User" as this is posted in a Staff only forum. What is the required minimum amount of characters? It's not pulling this from my forum settings as I deliberately posted an lengthy reply to see if I'd still get this error.
Curiouser and curiouser :)
Regards,
Renada
My Co-admin had the same problem. He said he sent a total of 5 emails, with the last one being a novel. However he was sending the email through a Microsoft Exchange Web Access Server, so I was thinking it might have something to do with that. It will also show unregistered user if your not sending the email from the email address in your user profile.
Also, can you try and change the mail settings to Pop3? That might clear up that IMAP error.
(I'm in NO way affiliated with the coder, however he's spent a lot of time working out some bugs on my forum, and I'd like to help him while he's offline)
rustybones
07-18-2007, 12:03 AM
Hi Cyricx,
firstly congrats on releasing this great mod!
Some problems I'm having is everytime I run the cron job I get this error
Email Integration
Warning: imap_open(): Couldn't open stream {203.17.68.100:110/pop3/notls}INBOX in \includes\cron\emailintegration.php on line 70
Warning: imap_headers(): supplied argument is not a valid imap resource in \includes\cron\emailintegration.php on line 73
Warning: imap_close(): supplied argument is not a valid imap resource in \includes\cron\emailintegration.php on line 799
Done
I take it, it is required for IMAP to be enabled on the mail server that we are trying to use (even though I had the POP3 option selected)? Being in a corporate organization I have to lodge a request to get them to do it .
Also I noticed "quick reply" will throw an error when this product is enabled, but if I refresh the page the post is displayed. I would give you the error it throws but it just says there was a problem with no other information.
thanks again
Renada
07-18-2007, 12:27 AM
My Co-admin had the same problem. He said he sent a total of 5 emails, with the last one being a novel. However he was sending the email through a Microsoft Exchange Web Access Server, so I was thinking it might have something to do with that. It will also show unregistered user if your not sending the email from the email address in your user profile.
Also, can you try and change the mail settings to Pop3? That might clear up that IMAP error.
(I'm in NO way affiliated with the coder, however he's spent a lot of time working out some bugs on my forum, and I'd like to help him while he's offline)
Hi,
Thanks for trying to help. :) I don't use anything Microsoft for Email - I use a programme called Pocomail and it is sending mail from the address that is in my profile. I also changed to Pop3 mail and still get the same error when running the cron job.
Any other idea? :)
Regards,
Renada
txspaderz
07-18-2007, 12:56 AM
Try sending from the web-based email. (I take it Pocomail is a form of email program like Outlook or Thunderbird). The mod might not be able to 'read' pocomail's email format correctly.
Does your server have IMAP available? I set mine on pop3 and it worked, however I do know my host has IMAP turned on, as I can setup an IMAP email account and connect through my Outlook.
txspaderz
07-18-2007, 12:57 AM
Hi Cyricx,
firstly congrats on releasing this great mod!
Some problems I'm having is everytime I run the cron job I get this error
Email Integration
Warning: imap_open(): Couldn't open stream {203.17.68.100:110/pop3/notls}INBOX in \includes\cron\emailintegration.php on line 70
Warning: imap_headers(): supplied argument is not a valid imap resource in \includes\cron\emailintegration.php on line 73
Warning: imap_close(): supplied argument is not a valid imap resource in \includes\cron\emailintegration.php on line 799
Done
I take it, it is required for IMAP to be enabled on the mail server that we are trying to use (even though I had the POP3 option selected)? Being in a corporate organization I have to lodge a request to get them to do it .
Also I noticed "quick reply" will throw an error when this product is enabled, but if I refresh the page the post is displayed. I would give you the error it throws but it just says there was a problem with no other information.
thanks again
I see your using an IP as your mail server. Is that what you would use in Outlook / Outlook Express or any other POP3 reader? Try the DNS form of that IP and see if that helps!
rustybones
07-18-2007, 01:16 AM
I see your using an IP as your mail server. Is that what you would use in Outlook / Outlook Express or any other POP3 reader? Try the DNS form of that IP and see if that helps!
I tried the DNS as well but no joy :( same error. This mail server is also a Microsoft Exchange server if that is of any relevance?
txspaderz
07-18-2007, 01:27 AM
Microsoft Exchange Server's don't allow POP3 do they? You can only use Outlook / Web Access to access the server don't they?
Renada
07-18-2007, 01:57 AM
Try sending from the web-based email. (I take it Pocomail is a form of email program like Outlook or Thunderbird). The mod might not be able to 'read' pocomail's email format correctly.
Does your server have IMAP available? I set mine on pop3 and it worked, however I do know my host has IMAP turned on, as I can setup an IMAP email account and connect through my Outlook.
Ok sending a reply via webmail worked :) It was very screwy with the formatting though and doesn't appear to like the BB Code Manager mod. Also the line above the signature came through as =3d =3d =3d etc lol!
Yes, my server has IMAP available and I too have set mine back to Pop3.
Getting closer though :)
Regards,
Renada
InTheBox
07-18-2007, 02:26 AM
Microsoft Exchange Server's don't allow POP3 do they? You can only use Outlook / Web Access to access the server don't they?
Depends on how the server is setup they also do pop3 and imap but you may have to configure them as they dont activate those 2 out of the box with a default install.
txspaderz
07-18-2007, 02:30 AM
Sweet, thanks for the clarification!
rustybones
07-18-2007, 02:58 AM
Depends on how the server is setup they also do pop3 and imap but you may have to configure them as they dont activate those 2 out of the box with a default install.
Yeah after further investigation both the POP3 and IMAP virtual servers on our Exchange server are currently NOT running... so I'm guessing that would be why the script can't open the stream.
Now my question is, which one is more useful/better? IMAP or POP3?
Cyricx
07-18-2007, 03:22 AM
Currently I've only tested this on IMAP enabled servers as it uses imap functions to fetch the headers and email info. To change this all that has to be done is one line of the php.ini file uncommented out and the php recompiled if I recall correctly :)
I'm lookin into both renadas and txspaderz errors and working to discover what those issues may be :)
Cyricx
07-18-2007, 03:38 AM
Okay the
imap_open() [function.imap-open]: Couldn't open stream
Error is most commonly due to the wrong connection type being chosen. If you get this error, try changing the type to one of the other 6 and rerunning the cron manually.
I suggest ONLY setting the settings up for one forum til you know what the settings need to be to work for your server :)
Otherwise, you could have one forum set wrong, and another set write, yet be getting frustrated by the error message that isn't going away ;)
Also!!!
NOTE! You must have a separate mailbox for each forum you wish to be enabled! Just like yahoo groups each have a different email address :)
The reason for this is to significantly increase the end user's ability to create a new thread by just sending an email with whatever title and message they want to the mailbox, which will then be grabbed by the cron and posted as a new thread :)
Cyricx
07-18-2007, 06:50 PM
Updated to 1.4
All confirmed bugs have been squashed and beaten with a very big twinkie!
txspaderz
07-18-2007, 07:22 PM
This thing rocks! Great job kind sir!
radarhunter
07-18-2007, 07:46 PM
can someone help me install this mod please......... especially the point
7. Create a new mail box.....
i`ve uploaded the files could someone having a few minutes free help me out....
Cyricx
07-18-2007, 08:13 PM
Do you host your own server, or do you pay a host to take care of your site?
if you pay a host, ask them to setup a pop3 email address for you
You'll need to also know the stuff you need to access the pop3 remotely, which will be a url like mail.yourdomain.com and your username and password :)
Then using those settings, you can try the various connection types, or ask your host which it will be.
Be sure to check in your Admincp -> Maintence -> View PHP Info to be sure you have IMAP compiled :)
Check the first post for details!
Tralala
07-18-2007, 08:40 PM
They have to subscribe to the forum, just like they had to with RedTyger's modification :)
When they go to subscribe to the forum there is a new option for "Instant Notification by Email".
This way people that hate mailing lists don't have to mess with them, but those that want it, can select it :)
That option will only show up for forums that have the email integration activated. Other forums will show just the usual forum subscription selections.
Okay, thanks for this explanation.
I'd like to make a feature request, at least with the "greenest" of users in mind... you know, the ones who have never used forum software, let alone vBulletin with all of it's options. The ones who are intimidated by the switchover and want it to just work via email "the way it used to with Yahoo." I know it sounds silly, but walking them through going into each forum, one by one, and subscribing in this way, is a bit counterintuitive.
Would it be possible for there to be an option in the UserCP instead, for users to be able to activate "email integration" for each available forum? Ideally the admins themselves could turn this on as a default, or turn it on for users who don't know how. Right now, there's no way to set a default and no way for admins to do it for users, without logging in as that user and doing it manually per each forum.
I'd love an easier way for this to be used on a forum of complete forum n00bs, is all.
Thanks for your great work on this, Cyricx.
Cyricx
07-18-2007, 08:47 PM
We are totally on the same page. :)
Right now I put a dirty little link on my forumhome page with "Posts by email" in the forum description box for the forums that have email integration enabled but it looks very tacky so I didn't include it in the release til I figure out something better.
I was thinking either a separate page that lists them like you mention.
Or some kick ass way to note which forums people could do it on through an icon or something on the forum home page, that was super easy to understand. Clicking it takes you to the forum subscription for that forum :)
I'm so back and forth on how to make it more simple while still looking and working great. :)
Like the old saying goes... Keep It Simple Stupid :)
Tralala
07-18-2007, 09:41 PM
Good to hear your feedback and thanks, Cyricx. Looking forward to seeing what you come up with; I trust ya. ;)
Corys8646
07-18-2007, 10:32 PM
great job on this mod! been looking for something like this for a while.
got it installed today and have been testing it out..
the Formatting on my emails seems to not be right, but not sure if it's my client (thunderbird) or something else. I'm getting HTML code, but it's rendering as text
the header on the email is:
Content-Type: text/html
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-Mailer: vBulletin Mail via PHP
I can view other HTML email just fine...
any ideas?
thanks again for a great mod
Corys8646
07-18-2007, 10:38 PM
I just noticed one more thing, when trying to create a new thread or reply to a thread via email, the subject of the email is being entered at the message and the actual email body is being dropped off. (which explains why I was getting the message too short error previously when it wasn't)
moonray
07-18-2007, 11:15 PM
Thanks for this extremely useful plugin.
On my domain, I use the GMail domain email services and not the server based SMTP/POP3. How do I configure the emails?
Thanks
Moonray
subnet_rx
07-18-2007, 11:38 PM
Do you have to do the file edits or not? I see in the instructions about the attachment types, which I don't think I want to do, but does that apply to all file edits or just the first one?
rustybones
07-19-2007, 12:22 AM
Ok so me again :) I'm just trying to get this running. I'm now trying out my ISP's pop3. When I run the cron job it says "done"
But then I check the mailboxes on the test users I've setup there are no emails :( What am I doing wrong?
rustybones
07-19-2007, 02:50 AM
And again: Finally got POP3 running on our companies mail server all is cool there and the cron job runs fine, but still no emails are showing up in my users inboxes, whats going on?!
Also the quick reply no longer works all that well... if i disable this product the quick reply works fine again? weirdness
txspaderz
07-19-2007, 04:05 AM
The formatting is a touchy issue. I think he'll have to work with each email program (Outlook 2003 / 2007, Thunderbird, Outlook Express, Pocomail, etc) to get the formatting right.
txspaderz
07-19-2007, 04:05 AM
Thanks for this extremely useful plugin.
On my domain, I use the GMail domain email services and not the server based SMTP/POP3. How do I configure the emails?
Thanks
Moonray
Try using the same settings that you would use if you were putting the information into an Email Program, like Outlook Express. Hostname : mail.gmail.com (or whatever they use) Username: / Password:.
txspaderz
07-19-2007, 04:07 AM
Do you have to do the file edits or not? I see in the instructions about the attachment types, which I don't think I want to do, but does that apply to all file edits or just the first one?
I would do the file edits. They allow for attachments and ad an additional query. Otherwise I don't think the plugin will work.
(I'm NOT a supporter of this hack. Just Chris has done ALOT of work on my site as a tester, and he's not here, I want to help him out as much as possible)
txspaderz
07-19-2007, 04:08 AM
Ok so me again :) I'm just trying to get this running. I'm now trying out my ISP's pop3. When I run the cron job it says "done"
But then I check the mailboxes on the test users I've setup there are no emails :( What am I doing wrong?
Are you subscribed to the "Forum" and not to a specific thread? I would double check the email address. Try sending an email from one of those test users to the email address that you setup for a particular forum, and see if it gets sent back or if it goes through.
rustybones
07-19-2007, 04:11 AM
I would do the file edits. They allow for attachments and ad an additional query. Otherwise I don't think the plugin will work.
(I'm NOT a supporter of this hack. Just Chris has done ALOT of work on my site as a tester, and he's not here, I want to help him out as much as possible)
So would you recommend doing all the hacks? or at least just giving it a try?
rustybones
07-19-2007, 04:41 AM
Are you subscribed to the "Forum" and not to a specific thread? I would double check the email address. Try sending an email from one of those test users to the email address that you setup for a particular forum, and see if it gets sent back or if it goes through.
Yeah I've tried numerous configurations. The last conifg I have is reverting back to my ISP's mail server using my login details and email address for my ISP. The test users have accounts inside our company and some with Gmail too... still no dice.
With my ISP mailserver I can use POP3 or IMAP but still no joy with either :(
Cyricx
07-19-2007, 11:36 AM
I just noticed one more thing, when trying to create a new thread or reply to a thread via email, the subject of the email is being entered at the message and the actual email body is being dropped off. (which explains why I was getting the message too short error previously when it wasn't)
Corys, is it possible that you could PM me a login and address to your site? If my preg_replaces don't account for the email type your getting then I'll make some adjustments to get it going :)
Thanks for this extremely useful plugin.
On my domain, I use the GMail domain email services and not the server based SMTP/POP3. How do I configure the emails?
Thanks
Moonray
Use the same settings you would use for outlook express or a similiar program.
Do you have to do the file edits or not? I see in the instructions about the attachment types, which I don't think I want to do, but does that apply to all file edits or just the first one?
The file edits are only needed if you want to allow alternate attachment types. They will not add any queries at all, and even the template edit that is done is done in a way that if you don't do the file edits, it will just keep rockin along with no issues :)
And again: Finally got POP3 running on our companies mail server all is cool there and the cron job runs fine, but still no emails are showing up in my users inboxes, whats going on?!
Also the quick reply no longer works all that well... if i disable this product the quick reply works fine again? weirdness
Yeah I've tried numerous configurations. The last conifg I have is reverting back to my ISP's mail server using my login details and email address for my ISP. The test users have accounts inside our company and some with Gmail too... still no dice.
With my ISP mailserver I can use POP3 or IMAP but still no joy with either :(
Rusty, the quick reply concerns me, that means it might not be behaving well with another modification. If you would like to PM me an admin login I'll figure out what is going on there.
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.
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.
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 ;)
Anyone that has fubared emails or posts please let me know :)
I know that this is why people have shyed away from making this mod in the past, but I'm determined to get this working for everyone!!
Hey, I can dream right? ;)
vocoder
07-19-2007, 01:20 PM
Question about this add-on : how do the posts look in the forum? For example, what would happen if a user replied to the email sent by this add-on with a different email address than the one listed in the forum? I take it this means it would also be possible to spoof email addresses to make it look like replies come from someone else.
(I haven't looked into this add-on much, just have read the intro)
Cyricx
07-19-2007, 01:29 PM
Question about this add-on : how do the posts look in the forum? For example, what would happen if a user replied to the email sent by this add-on with a different email address than the one listed in the forum? I take it this means it would also be possible to spoof email addresses to make it look like replies come from someone else.
(I haven't looked into this add-on much, just have read the intro)
If the email address doesn't match a user it sends an error message back, and will not create a post.
As far as the replies coming from someone else keep in mind, unlike yahoo mailing lists, with this modification, NOONE sees your email address!! :)
The emails come tagged as from: Poster's name <reply to email address>
So your email address is even more protected then normal mailing lists allow.
vocoder
07-19-2007, 02:13 PM
thanks for the answers!
I get an error when trying to install the product:
Database error in vBulletin 3.5.4:
Invalid SQL:
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'Quote template', 'cache_templates', '$globaltemplates = array_merge($globaltemplates, array(\'bbcode_quote\'));', 'emailreplyint');
MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
These are the only fields in my plugin table:
pluginid
title
hookname
phpcode
product
devkey
active
Do I need to upgrade to the latest version of vb for this to work?
Tralala
07-19-2007, 02:48 PM
I have just installed and am in the process of testing this baby out. Very excited.
For the most part the reason I love this new hack is that it allows for the posting of threads and replies via email. My users will really appreciate it.
I previously had RedTyger's code installed "Instant new thread notification" (https://vborg.vbsupport.ru/showthread.php?t=141280) -- and I notice you used that code in the process of developing this new one. Now when I go to Forum Tools -> Subscription Type, I see two identical entries under Notification type called "Instant Notification by email."
No problem, I go into AdminCP and disable the previous hack by RedTyger, and now one of them is gone from the Subscription Type pulldown. But I realize that means users can no longer subscribe to instant notification of "new threads only." And I'd like to retain that option, if possible. So perhaps for a future version, this hack could offer two types of subscription:
-Instant notification by email of new threads only
-Instant notification by email of new threads and all replies
I request this simply because the way my forum is structured, the 2nd option might be too much for some folks and will ultimately flood their email inbox, scaring them away. The 1st option, of course, is enough to keep them in the loop of new topics and announcements, and may even entice them to login to the forum and be more active via the web.
Thanks for the consideration. I suppose I could go in and rename these things myself to get them to coexist peacefully... but figured I'd request it for the benefit of others.
Cyricx
07-19-2007, 02:55 PM
thanks for the answers!
I get an error when trying to install the product:
Database error in vBulletin 3.5.4:
Invalid SQL:
MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Do I need to upgrade to the latest version of vb for this to work?
Vocoder - You'll either need to upgrade, or edit the product xml file and change all of the <plugin active="1" executionorder="5"> to just <plugin active="1">
Vbulletin 3.6 added executionorders to the plugins which is something 3.5 didn't have.
Hypothetically, this modification should work on 3.5, but I'm only offering support for 3.6 boards due to the complexity of the modification.
Thanks for the consideration. I suppose I could go in and rename these things myself to get them to coexist peacefully... but figured I'd request it for the benefit of others.
You've got some kick ass ideas!! Thank you!!! :)
I had planned on a future version getting this to coexist with subscribed forums/threads. So if you subscribed to a thread that email integration was turned on in, you would be able to reply to the email you get for subscribed threads :), and it's definatley in my brain for a future version.
The new thread only thing is kick ass as well! And should not be hard for me to code at all! I'll add it to my list and it should make it into 2.0
I want to let 1.x ride a little bit to find out what other email programs are not behaving well before I start on 2.0 though :)
Keep the suggestions coming!!
vocoder
07-19-2007, 02:58 PM
yeah, I went and upgraded to the latest vB and it installed just fine.
When a new post is created, it sends out the email just fine, however when I reply to that email, it never shows up in the forum. I'm using Exchange for the email server, and have IMAP enabled, but still think there may be some problem with that setup....is there a good way to test?
I'm just wondering if when it sends the email, is it also using the imap server that is specified for the forum, or is it perhaps using localhost (vb is running on a linux server with mail)
Tralala
07-19-2007, 03:12 PM
Okay, so I set up a new mailbox on my server and confirmed that I could email to it, as well as check it. (BTW, a good free web tool to confirm this is Mail2Web. (http://mail2web.com/cgi-bin/login.asp?lid=0&il=0))
I know my email hoster supports POP3 and IMAP because I have set up regular email accounts and clients using both over the years.
But, with this hack, I chose POP3, and then just ran the cron job manually and got this 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 70
:(
I was afraid that might happen.
To verify if you have IMAP installed go to your admincp -> Maintence -> View Php Info and you should see something like this:
imap
IMAP c-Client Version 200X
Sure enough, I looked in there and didn't see anything listed about "imap."
Just wondering, is enabling IMAP support necessary even if we've chosen POP3 in the Forum Manager prefs? I ask this because getting my webhoster to do anything, even as simple as enabling the line for imap support, is often an uphill battle.
vocoder
07-19-2007, 03:13 PM
I ran the cron and seem to be getting the
Call to undefined function imap_open() in /var/www/bb/includes/cron/emailintegration.php on line 70
error. I recall seeing posts about this here, I'll look to see what is causes this.
Tralala
07-19-2007, 03:21 PM
One more question. When emails are fetched from the mailbox to be posted, are they deleted from the mailbox, too? (Just asking because I don't want to see that mailbox be filled up eventually.)
Tralala
07-19-2007, 03:22 PM
I ran the cron and seem to be getting the
Call to undefined function imap_open() in /var/www/bb/includes/cron/emailintegration.php on line 70
error. I recall seeing posts about this here, I'll look to see what is causes this.
See the FAQ in post #2.
https://vborg.vbsupport.ru/showpost.php?p=1281490&postcount=2
vocoder
07-19-2007, 03:29 PM
okay, I enabled the php imap extension...now i am getting different errors. it looks as though its trying to use the POP3 port instead of hte IMAP port, even though I have IMAP selected?
It should be using port 143, right, not 110? these are the errors i now get:
Warning: imap_open() [function.imap-open]: Couldn't open stream {mail.mymailserver.com:110/pop3/notls}INBOX in /includes/cron/emailintegration.php on line 70
Warning: imap_headers(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 73
Warning: imap_close(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 807
EDIT: my settings are correct, I tested it with thunderbird IMAP just to doublecheck. and it works fine with thunderbird. I think it has to do with the port.
Cyricx
07-19-2007, 03:38 PM
One more question. When emails are fetched from the mailbox to be posted, are they deleted from the mailbox, too? (Just asking because I don't want to see that mailbox be filled up eventually.)
Yes on each loop of reading each message, either when it gets an error or when it completes the process of working with that email it marks it to be deleted. Then just before it closes that mailbox, it deletes all those emails :)
okay, I enabled the php imap extension...now i am getting different errors. it looks as though its trying to use the POP3 port instead of hte IMAP port, even though I have IMAP selected?
It should be using port 143, right, not 110? these are the errors i now get:
Warning: imap_open() [function.imap-open]: Couldn't open stream {mail.mymailserver.com:110/pop3/notls}INBOX in /includes/cron/emailintegration.php on line 70
Warning: imap_headers(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 73
Warning: imap_close(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 807
EDIT: my settings are correct, I tested it with thunderbird IMAP just to doublecheck. and it works fine with thunderbird. I think it has to do with the port.
Please try the other options such as with official and self signed certificate as well.
There are 3 different pop3 and 3 different imap connections due to the varied kinds of ways people can setup their servers :)
To your previous question, the emails being processed to the forum are controlled through the cron job, if the cron cannot connect, it will not process those emails :)
however, it will still send out emails when someone posts from the forums. :)
quiklink
07-19-2007, 05:32 PM
Tried this last suggestion, not working. What I do notice is that is does not appear to be recognizing the connection type and instead keeps trying to connect via standard POP3 even if it is set to something else in the forum.
quiklink
07-19-2007, 05:38 PM
Update to last post. Yup, you are calling the wrong variable when setting up the $connectmailserver statement. It should be ei_connectiontype.
Cyricx
07-19-2007, 05:40 PM
checking :)
quiklink
07-19-2007, 05:44 PM
Still doesn't fix the overall problem though.
Cyricx
07-19-2007, 05:47 PM
Please try the new uploaded zip.
You were correct. The reason most were not experiencing it is that the field defaults to 0 and most people will not need to change their settings from pop3.
quiklink
07-19-2007, 05:49 PM
Already changed it here, but it still doesn't stop the failed stream error no matter what it's set to.
Cyricx
07-19-2007, 05:51 PM
I'll have to see your settings to figure out what the modification is doing wrong :(
I can't guess at what your settings are unfortunately :(
Can you send me a login via pm?
Update: since the 1.5 fix, it correctly recognizes connection types. On my home site, I have 4 forums enabled, when I change the connection type for one of them I get the errors. I would suggest running a global query something like
update forum set ei_active = 0;
and then go back and edit one forum and play with it's connection type, my guess is you may have accidently turned on a second forum as active
in future versions I'll code in a die loop so if it gets that error it'll like send an email to the admin or something, *shrug* I'll figure something out :)
vocoder
07-19-2007, 06:19 PM
update to my issue (i selected IMAP, but it was using the settings for POP3)
the only way I could fix it was to actually go into the emailintegration php file and make it so POP3 settings used IMAP settings instead...then it worked fine. And I want to stress that my forum was set to use IMAP.
Cyricx
07-19-2007, 06:19 PM
vocoder, please try the file from the new zip version 1.5
There was an error in the cron file that was not correctly viewing peoples connection types :(
subnet_rx
07-19-2007, 06:52 PM
Hmm, well, it looks like needing the imap extension is going to stop me from using this. I do run on a vps, but php was not compiled with the imap extension and php.net is telling me I have to have other software to support it before compiling php with it. I do have some users that have internet blocked at work that this could be useful for, but being unsure how many people would use it, I don't think I want to risk the downtime.
Cyricx
07-19-2007, 06:54 PM
I don't think you need any additional software at all. If I recall right it's a simple edit to the php.ini file.
It certainly isn't software that costs you anything. I'm not the server guru though, so perhaps someone who is can chime in with how easy it is to grab imap :)
I stand corrected, you do need to download and compile one item. I put a link in the first post with a link to installing imap. Seems fairly painless though :)
quiklink
07-19-2007, 07:06 PM
I think I found the problem. In my case the password being used begins with a zero, but the zero is being dropped for some reason so it's passing an invalid password. If I hardcode the password in, it works.
Changed my password to one without a starting zero and it works, well at least I don't get the cron error anymore. Going to test it all now.
Cyricx
07-19-2007, 07:08 PM
How many characters long is the password?
Cyricx
07-19-2007, 07:12 PM
NM, can't be that.. hehe I've got the field set for 50 characters allowed...
Hmmm, let me test over here too.
quiklink
07-19-2007, 07:37 PM
Ok seems to be working to a degree, but whenever I reply via email I get back an error saying
Message too short: your message does not have the required minimum amount of characters.
Cyricx
07-19-2007, 07:59 PM
Hold up Quik, I've got a new version I'm about to roll up with that will handle emails that are only coming in as text only format.
Waiting for cory to test it out :)
quiklink
07-19-2007, 08:03 PM
excellent! happy to test here if you'd like
Cyricx
07-19-2007, 08:10 PM
Thank you so much for your patience quik!!! The zip is up!
The new version is up, just need to reupload the emailintegration.php file to upgrade.
The thing I really hate about the text only emails more so then the html is all the > and * line starts. I'm currently trying to find a way to get preg_replace to rip out the > and * characters if they are on a line by themselves..
Whew.. I'm quite the busy bee!
quiklink
07-19-2007, 08:15 PM
Heh, I hate HTML email myself, but I'll put up with it for this mod ;)
You are doing a fantastic job! This mod is one I really want to get working properly as we have a lot of folks who prefer using a mail list rather than the forums. This gives us the best of both worlds.
Grabbing the new file for testing now
Corys8646
07-19-2007, 08:18 PM
if you are looking for any input, my preference would be to have it be all text only emails...
HTML just seems to really add a lot of confusion, and I also think that users that are coming from older email discussion groups are used to text only. It really seems to simplify things.
anyway my $.02
great job!
Cyricx
07-19-2007, 08:18 PM
I should really put up a list of my future planned features :)
One of them will be a usercp controlled switch that users can select to get these via html or plaintext :)
Kinda waiting to work on too many features til I know the preg_replaces are handling incoming emails right. Those are the key functions, everything else is just toppings :)
Cyricx
07-19-2007, 08:19 PM
The problem with text only all the time is
A) smilies get lost, the plaintext parser rips them out entirely, not even the replace code remains.
B) links to your forums become inactive, thereby losing the ability to encourage your users to come to your forum, rather then just sit back and read emails
The second one is the big kicker for me.
But hey.. I'm all about user optional :)
quiklink
07-19-2007, 08:20 PM
Woot, that looks like it got it!
quiklink
07-19-2007, 08:26 PM
One suggest if there is any way to do it. Don't have it send replies back to the person who sent the reply. No biggie though.
Again let me say thanks for a great mod with a lot of potential!
Corys8646
07-19-2007, 08:26 PM
B) links to your forums become inactive, thereby losing the ability to encourage your users to come to your forum, rather then just sit back and read emails
I see your point, In my experience with text only emails - the email client will still usually create links as long as you have the www.
at least on thunderbird it does.
all the links that vbulletin sends out (thread notifications etc etc) are all clickable links for me, as text only..
Cyricx
07-19-2007, 08:29 PM
Ah right on. Maybe it won't be as bad as I fear.
It shouldn't be hard at all to code. It will make it into one of the early versions for sure :) Just gotta get through these various email programs first :)
And those damn lines with just > on them that are driving me insane LOL!
Cyricx
07-19-2007, 08:39 PM
One suggest if there is any way to do it. Don't have it send replies back to the person who sent the reply. No biggie though.
Yeah, I've debated back and forth on that one. The mailing lists send it to yourself. Which can be nice if you like start a thread and then go.. O crap, I forgot about this, you could grab your email about the thread posting and reply to that and yoru good to go.
Without getting emails back to yourself (like mailing lists do), you'd either A) have to wait for someone to reply or B) have to jump over to the forums :)
It will likely end up becoming another end user option though with the default being receive emails about your own posts.
Besides it also makes sure you know it actually posted :)
What do others think? :)
txspaderz
07-19-2007, 10:00 PM
I like the idea of that being an end user option, for the reply to who replied.
Tralala
07-20-2007, 12:18 AM
Sadly, my ISP won't enable the imap_open() requirement, so I'm going to have to sit out of this one for a bit. I see this is a pretty common issue though; here's a page for folks who need to deal with it.
http://drupal.org/node/121634
I guess when I get some time I'll attempt to custom compile PHP... or find a kind soul willing to help. :)
tekguru
07-20-2007, 04:51 AM
Well back from holiday and this just had to be installed before I hit the shees last night :)
Looking good and working well so far. Suggestions from me include those already on the to do list, but I'd like to add:
- Option to remove the signature when exporting the email.
- Option to remove some of the links in the email footer - for example we dp not use the Calendar at all on site and have it turned off.
Anyway the site staff should hopefully start testing it later on today. More thoughts from me later when I start to try getting clever with the system :)
tekguru
07-20-2007, 09:31 AM
Well all was looking good to me until I replied to a post from Outlook 2007 this morning and got:
http://www.4winmobile.com/news/font.jpg
http://www.4winmobile.com/news/font2.jpg
As you can see, all sorts of extra font info :(
Cyricx
07-20-2007, 12:02 PM
Tek, please PM me your email address. :) I'll then send you an email that I'll have you reply to, which will give me a copy of your email format to fiddle with til i get the preg_replaces to work right :)
On your suggestions - Option to remove the signature when exporting the email. - not completely sure what you mean. You mean the email that you receive not having the signature?
Trala, if you have any luck with that please hollar!! I have only researched the imap route so far. I'm uncertain what other options are available to retrieve the email with php. Even the class files I've found at www.phpclasses.org (http://www.phpclasses.org) all use imap functions that I could find :(
I'll add some of the suggestions to the future list. :)
tekguru
07-20-2007, 01:02 PM
Not a problem, email address just sent over. It should be noted though that the first three or four messages processed through did not have the problem at all which is plain weird!
Yep the option was to send the email out minus the Signature as some of my guys do use rather long sigs :)
Cyricx
07-20-2007, 05:34 PM
I'm gonna kinda be MIA for this afternoon and tomorrow, got some stuff going on at the homefront. Sunday I'll be back to working on this :)
Maybe sunday I can get a few of the options coded in and go to a 2.0 version ;) will have to see :)
Piggo
07-20-2007, 11:25 PM
Cyricx,
This has gotta be the fastest ever developed plugin with such a HUGE HUGE benefit, a few days, and you took if from BETA, and now almost v2.0! Way cool.
I can't believe how fast you made this, and reacted to comments here.
KUDOS
KUDOS
KUDOS
Gladly made a donation of ten bucks for the effort! Great job.
Piggo
07-21-2007, 02:01 AM
Sadly, my ISP won't enable the imap_open() requirement, so I'm going to have to sit out of this one for a bit.
Darn, I'm in the same boat. :(
I might consider to move the whole thing over to a diffferent serve, just so I can run this!
If you find a relatively simple way of custom compiling PHP, Tralala, please let us know...
quiklink
07-21-2007, 08:06 AM
So far it's working great! Still missing a few *'s and >'s in text replies but nothing major. One thing I did notice is that replies via email do not seem to be associated to the proper posts if you view the forum in Threaded or Hybrid modes. Again nothing major but might be worth looking into correcting.
It would also be good if we could customize the 'footer' of emails that are sent to change the links, add advertising, etc.
Am i correct when saying that you need one mailbox per forum section ?
Would be nice to have it sort that out within the extension.
Something in the header for example
[Forum ID] [Thread ID] Title
or am i missing something and this is already implemented?
That way only one email address would be needed. :)
Piggo
07-21-2007, 01:00 PM
Okay, still no luck; was trying to install the new/updated PHP 5 with enabled IMAP, but I have no idea how to run a .sh file. How do I execute a .sh file on a server?
Any help much appreciated.
tekguru
07-21-2007, 03:31 PM
Looking at some of my font / colour issues on the email replies I'm posting into the forum when one looks at the message BBCodes on can see in:
Yeah I know Steph ? this is one of the issues the =authorhas to fix.
Ignoring away Jim J
Fairy nuff keep us posted!
That the ' character appears in there spuriously if that is actually removed by hand then the font format issues are fixed.
Mind you it may well be worth killing off any FONT / COLOR codes in imported messages as that would fix the issue.
------
Suggestion - another useful features would be for an Admin to be able to see via the CPL who was subscribed to each forum and also have the abilitry (probably from teh same page) to add in users either by usergroup or via individual username.
Tralala
07-21-2007, 04:33 PM
Suggestion - another useful features would be for an Admin to be able to see via the CPL who was subscribed to each forum and also have the abilitry (probably from teh same page) to add in users either by usergroup or via individual username.
Yes... or an option to have subscriptions turned on by default for all members!
Piggo
07-21-2007, 06:42 PM
Tralala, it seems to start to come together.
Using PuTTy and installing PHP5 and the custom one...
will update if successful....
quiklink
07-21-2007, 06:52 PM
You are going to have to rebuild Apache as well.
Piggo
07-21-2007, 09:45 PM
It works!
Managed to get it working on a DREAMHOST server.
It took almost all day (I am new to all this, hence the time) but it works.
Testing it now...
Tralala
07-22-2007, 12:16 AM
Cool, Piggo, looking forward to hearing your notes. Much appreciated!
Piggo
07-22-2007, 01:25 PM
As mentioned, installing this GREAT email integration plugin isn't difficult, as long as IMAP is enabled on your server.
It isn't with DREAMHOST.
All the following is based on this, and using a WINDOWS XP machine.
To enable IMAP on a DREAMHOST server, you need to custom compile a PHP5 file.
In order to do that, you need to be able to setup SSH on your WINDOWS computer.
This isn't really a step-by-step, but just some points that need to be done.
1) Select a USER on the DREAMHOST panel that has access to your DOMAIN hosted by DREAMHOST. Change to USER ACCOUNT TYPE "Shell account - allows FTP plus ssh/telnet access."
2) Go here and do what that describes in order to get PuTTy working:
http://www.phileplanet.com/archives/2006/08/how-to-setup-ssh-on-windows-xp/
(more reading here: http://www.wiki.dreamhost.com/SSH , but above link should be all that is necessary)
NOTE: I needed to change the PUTTY setting to CATEGORY/TERMINAL: Local echo and local line editing to FORCE ON, and used the PuTTY comand promt by going START/ RUN / and type putty
3) You will need 3 files/codes.
The first two can be found here:
http://wiki.dreamhost.com/PHP_5_install_script
a) called php5-install-prep.sh ; b) called php5-install.sh
The third comes later....
The easiest way is to COPY those codes, and save them as a TEXT FILE IN NOTEPAD. The simpleton I am, I used file names 1.txt for php5-install-prep.sh, and 2.txt for php5-install.sh
Before saving those files, change the DOMAIN NAME to your DOMAIN in BOTH FILES, in this line which is about line #22 or so:
export DOMAIN="your-domain-here.com"
4) Then follow the instructions here:
http://wiki.dreamhost.com/Custom_compile_PHP_5
Pertinent will be this, although you will need to do it TWICE, using the 1.txt file and then the 2.txt file:
Install/Compile PHP 5
Open 1.txt and SELECT ALL and COPY.
Log in to your account using SSH with the PuTTY program mentioned above.
Create a new file in your SSH by entering the command:
vim 1
Hit i for insert mode, then right-click to paste your clipboard (the install script) contents, then hit Esc, type :wq (that's 'colon', 'w', 'q'), and press Enter to save and exit.
Make the file executable by entering the command:
chmod +x 1
Run the script by entering the command:
./1
Now the initial script will install; it will take a few minutes!
Now repeat for the second file:
Open 2.txt and SELECT ALL and COPY.
You are probably still logged in right now...
Create a new file in your SSH by entering the command:
vim 2
Hit i for insert mode, then right-click to paste your clipboard (the install script) contents, then hit Esc, type :wq (that's 'colon', 'w', 'q'), and press Enter to save and exit.
Make the file executable by entering the command:
chmod +x 2
Run the script by entering the command:
./2
Now the final script will install; it will take a few minutes!
After it has finished you will need to edit your htaccess file appropriately. Add the following:
Copy the following and paste into NOTEPAD, and saving it as ".htaccess":
AddHandler phpFive .php
Action phpFive /cgi-bin/php.cgi:
And FTP that file ".htaccess" to your DOMAIN.
Notes:
1) For the SSH session you need to be above your DOMAIN. I.e. you should see such folders as Maildir, logs, yourdomain.com, etc. The .htaccess file however, goes INTO yourdomain.com folder.
2) the FTP program I normally use isn't really good in showing such files as .htaccess, so i downloaded WinSCP free from:
http://winscp.net/eng/index.php
I also did this at the end of this page:
http://www.davidfugate.com/roll-your-own-php5-dreamhost-drupal
cp /etc/php5/cgi/php.ini /home/yourusername/
although I am not sure if that was necessary.
Hope some of this is helpful....
Andreas
07-22-2007, 03:22 PM
Phrases instead of hardcoded text would be nice :)
Tralala
07-22-2007, 03:39 PM
As mentioned, installing this GREAT email integration plugin isn't difficult, as long as IMAP is enabled on your server.
Thanks so much for this, Piggo... you rock!
tekguru
07-23-2007, 08:58 AM
Any developments with the coding this weekend? Just wondering as on the forum here we are suffering from:
Additional = characters appearing
' characters appearing in the wrong place
Some online posts appearing without bodies via email
Signatures not appearing in emails
Cyricx
07-23-2007, 03:13 PM
Am i correct when saying that you need one mailbox per forum section ?
Would be nice to have it sort that out within the extension.
Something in the header for example
[Forum ID] [Thread ID] Title
or am i missing something and this is already implemented?
That way only one email address would be needed. :)
The original version required that. I found it to be very unuser friendly. Those that love mailing lists hate any inconveiance and having to put a specific prefix in the subject line like [f-5] for forumid 5, was shot down unanimously and would result in none of the mailing list people moving over of the ones I polled :)
If someone wants to make a mod based off of this one that does that, they are welcome to :)
Eventually I might code a version like that, but it would be FAR down the line :)
Looking at some of my font / colour issues on the email replies I'm posting into the forum when one looks at the message BBCodes on can see in:
Yeah I know Steph ? this is one of the issues the =authorhas to fix.
The plan is to rip out any color or font html that has # ' or " in it, before it converts to bbcode which should keep any extra [/font] from being left over. Gotta test this out over the next day or two :) I'll get with you to get some scripts to test out :)
Suggestion - another useful features would be for an Admin to be able to see via the CPL who was subscribed to each forum and also have the abilitry (probably from teh same page) to add in users either by usergroup or via individual username.
Great idea!! Adding to future plans :)
Phrases instead of hardcoded text would be nice :)
Absolutely, I hope to get this into 2.0, it'll depend on how quickly the debugging goes :) But yes, phrasing is absolutely planned! :)
Any developments with the coding this weekend? Just wondering as on the forum here we are suffering from:
Additional = characters appearing
' characters appearing in the wrong place
Some online posts appearing without bodies via email
Signatures not appearing in emails
Sorry, this weekend was VERY hectic! I'm a pretty busy bee on the weekends hehe.
Digging into the list of bugs today and tomorrow to see what all I can get resolved as quickly as possible.
AyeCapn
07-23-2007, 05:34 PM
Cyricx - I got directed to this thread from the custom app discussion in RedTyger's thread (https://vborg.vbsupport.ru/showthread.php?t=141280) and I am glad to see how well your app has been coming along. I'll be installing and testing this afternoon sometime.
Would a modification to this app be possible taht would provide instant email notification like this:
vBulletin has a features in the AdminCP that allows administrators to be notified via email for each new post that is made. I would like to extend this functionality to all users who request it.
The current feature can be found here:
Forums & Moderators > Forum Manager > {some forum} > Moderation Options > Email Addresses to Notify When there is a New Post (Separate each address with a SPACE)
The space provided is finite, and I'd like it to be a profiule option instead. There would be one profile checkbox (yes to reveive or no don't receive) for each parent forum on my site.
Combine that functionality with reply by email and you have effectively rendered Yahoo groups useless :)
quiklink
07-23-2007, 05:50 PM
If you are subscribed to the forum using this mod you receive immediate copies of all posts.
AyeCapn
07-23-2007, 05:53 PM
If you are subscribed to the forum using this mod you receive immediate copies of all posts.get the funk out!
like... for serious? :eek:
Cyricx
07-23-2007, 06:30 PM
Yep! This mod is meant to completely simulate the yahoo groups and other mailing lists :)
Though it is a constant work in progress due to the various email processors out there :)
AyeCapn
07-23-2007, 06:32 PM
managed to get the thread posts to generate an email, but creating a post from an email doesn;t seem to do anyhting.
When I run the CRON job manually I get this error even after testing all the 6 email types:
Fatal error: Call to undefined function imap_open() in /home/yaddayadda/public_html/forum/includes/cron/emailintegration.php on line 70
AyeCapn
07-23-2007, 06:34 PM
is it feasible to subscribe to a parent forum and then be automatically subscribed to all child forums? What about parent forums that do not allow posting?
quiklink
07-23-2007, 06:47 PM
managed to get the thread posts to generate an email, but creating a post from an email doesn;t seem to do anyhting.
When I run the CRON job manually I get this error even after testing all the 6 email types:
Fatal error: Call to undefined function imap_open() in /home/yaddayadda/public_html/forum/includes/cron/emailintegration.php on line 70
IMAP isn't configured in your PHP setup.
AyeCapn
07-23-2007, 07:02 PM
talked to my host and he confirmed that athough IMAP is working for email, he didn;t compile PHP with te IMAP module.
self-pwned :)
quiklink
07-23-2007, 07:16 PM
Heh, I found out the same thing from my old host. Was the last straw in a series of 'what the hell are you guys thinking' problems with them and I moved.
Cyricx
07-23-2007, 08:35 PM
is it feasible to subscribe to a parent forum and then be automatically subscribed to all child forums? What about parent forums that do not allow posting?
A separate email address is needed for each forum. Otherwise in order to start a new thread from email you'd have to do type something like [f-2] this is new thread title
into the subject line. Very inconveinant and it was not pretty when I discussed doing that with the users I was trying to convert when I was making this mod :)
But I'm planning a simple interface to enable people to easily subscribe to multiple forums, though it will be a ways down the pipe til I get the issues solved with various mailbrowsers.
On the parent forums that don't allow posting, I'll have to investigate if the current error checks catch that.
Cyricx
07-24-2007, 11:42 AM
I've started coding 2.0 and I'll be looking for a few beta testers. I'm changing the method that I decode emails back to beginning with plain text as there are entirely too many different html formats. We would be in constant development at that route :)
For 2.0, I've already coded in the phrased controlled error messages and will be working on the user options as well as some usergroup / admin options.
AyeCapn
07-24-2007, 11:45 AM
i'm in for beta testing
henrikhansen
07-24-2007, 11:46 AM
I'm changing the method that I decode emails back to beginning with plain text as there are entirely too many different html formats. We would be in constant development at that route :)
Seems like a good priority
tekguru
07-24-2007, 11:55 AM
As per the email Chris you can sign me up for testing!
Tralala
07-24-2007, 05:12 PM
Another idea I'm hoping you'll consider, Cyricx. I'm wondering if your ambitious hack is overlooking a very simple need, one that would satisfy the demands of a small (about 150-200 users) forum I'm administrating... and many others out there, I'm sure.
Your current mod allows for users to "subscribe" to forums (to receive every thread and post via email) as well as to post via email. Much appreciated. But it does require action on their part... action which is often too much to expect from the less active or less savvy members. That's why the request to allow moderators to set this for them-- or allowing auto-subscription to be the default -- is important. Without that, I fear a user's inactivity will spiral downward, without any email alerts, until they fade into oblivion with no participation at all.
But how about going in the other direction... affording users (in certain usergroups, if necessary) to be able to mass email out announcements to all other registered users, from within the forum interface?
Right now, only Admins can do this, from AdminCP. Under Users -> Send Email to Users. I'd like to afford that privilege to all of my users, without forcing them to "create a thread" (and involving your hack in its current incarnation) to do so.
Match the "from" address to be the same as their confirmed, registered one (and mask them from being able to change it) and it'd be a real winner, in my book.
On my small forum that's exactly what we'd need to finally be able to kick Yahoo! Mailing list to the curb.
In the meantime I have installed Super PM (Mass PM) (https://vborg.vbsupport.ru/showthread.php?t=100314) and enabled it for individual users. But it's not the same -- PM alerts aren't received exactly as emails are (and are often ignored.) And users need to be added individually and manually to be able to use the hack. And that mod, apparently, in need of a vB 3.6.x port anyway. So it's not going to do the trick.
Right now, we're straddling the fence, using Yahoo! for email announcements, and vBulletin for interaction and discussion. It's annoying to me, because the member lists aren't in sync and it's becoming a nightmare to keep straight. Users are getting confused as to why we're maintaining both.
And yet, if someone wants to simply "email all registered users," the only way they can do this now is by using the Yahoo! mailing list. There's no such functionality in vBulletin.
Perhaps this hack may assist, at least for permissions: "Allow Users to eMail other Members" per Usergroup (https://vborg.vbsupport.ru/showthread.php?t=102371)
I haven't seen any mod like this yet, and it would be a major boon for small forums that need the simple functionality of a mailing list. I think if users could have a easy way to blast out emails to all other users (for, say, very important announcements,) while still being able to use the forum as it was originally designed and intended, it would fit the bill for many, many folks hoping to migrate away from Yahoo!'s mailing list. And it leaves just enough incentive for folks to sign up and check out vBulletin, and start getting their feet wet with the forum interface for all other kinds of chat and discussion.
Whaddaya think?
Cyricx
07-24-2007, 05:17 PM
I do have plans to enable this to have automatic subscription if the admin wants, that's hoped to be accomplished very soon.
Would that resolve your needs?
You'd be able to have an announcement forum, that all the users are automatically subscribed too. Then the users you wished to be able to create threads could do so and it would send out the email to all your members.
Tralala
07-24-2007, 07:50 PM
I do have plans to enable this to have automatic subscription if the admin wants, that's hoped to be accomplished very soon.
Would that resolve your needs?
You'd be able to have an announcement forum, that all the users are automatically subscribed too. Then the users you wished to be able to create threads could do so and it would send out the email to all your members.
Hmm. I suppose I could work with that. I'll have to give it a try. What I don't like about that is the "FROM" address would be the forum admin's email address I imagine -- alerting the recipient essentially that a thread has been created -- and not from the actual sender. It adds a level of confusion and complexity I was hoping to avoid.
Would it be possible that this "announcement forum" is invisible, only set up as a gateway for the emails to get sent out? (I don't see it as even having to be an "active" forum.)
Also, if I only plan to allow users to receive new threads and replies (and these "announcements") via email ... but not actually POST via email... is the IMAP support still required?
I ask because my webhoster (Dreamhost) doesn't support it, and I'm not really sure we need that component. If a user wants to post, well, they can revisit the forum.
I simply want my users to get informed of posts and announcements via email, so they are kept in the loop about an upcoming event that's being planned for them. They rarely respond, but need to get info from the smaller subset of organizers. So that's why I love the idea of your hack. I'm just hoping it could be used more like a mailing (mass distro) list, sourced by the vBulletin's member database.
Cyricx
07-24-2007, 09:08 PM
Tralala,
I'm not really sure I would want to work that level of specialization into this modification. It's not something I would ever use and I see the use of that being very low. Perhaps if I got this mod to my super happy spot where I was proud of it and had nothing else to do, I might work up those tweaks, but it seems that what you are wanting is much more extensive then I could put time into doing at this time.
I'm hoping to truly just replace the yahoo group and similiar type mailing lists. :)
I think what you are wanting is not what I'm offering here. The bulk of this modification about 90% of it, is handling retrieving emails and putting them into posts. Something your not wanting to do, your just looking for the notification aspect.
ChurchMedia
07-25-2007, 04:59 AM
Sorry if this has already been addressed. I couldn't find an answer. This is a brilliant hack and my users are going to love it! I plan on making a sizable donation as soon as I release it to my community.
The problem I am having is that on a reply I get a lot of BBcode that is a mess. New threads (plain or HTML) and plain text replies are fine, but if you use HTML for an email reply the email AND the forum show the messy BBcode.
Did I miss something or is this being worked on? I've attached a screenshot so you can see what I'm getting. I'm using Outlook XP.
Thanks for all your hard work. VERY cool hack. I'll go on strike if you don't get HOTM for this one! :)
Cyricx
07-25-2007, 11:17 AM
Thanks!!
Fixes for that should be included in 2.0 which should be released soon
I'm currently workin on the admin option to enable/disable links in the footer of the emails.
Then I'll work on automatically subscribing members of certain usergroups. Once that is done I'll release 2.0 :)
Cyricx
07-25-2007, 04:59 PM
Just wanted to drop a quick note...
Autosubscribe will be in 2.0!
Right now it's controlled from the usergroup manager, you set auto-subscribe to yes and enter the forumid's separated by commas of forums that when added to that usergroup the member can access.
The code even handles overlapping usergroups. For example if you have two usergroups that give access to forumids 9,11 it won't count those forumids twice :)
I'm thinking we need a PM sent to the user to let them know that subscriptions have been added for forums x and x with links to change those settings if they wish, with an admin option to enable/disable the pm.
I also think I need to code a script to update autosubscriptions, which will overwrite any subs people may have so it'll have to be controlled per usergroup so if you change the settings for one usergroup, you can go and readd the auto subs, without adding a ton of subs for the other groups that people may have tweaked and changed.
The update script will have to make it into 2.0, the PMs may make it into the next version depending on how easy they are to code in :)
tekguru
07-25-2007, 05:03 PM
Sounding good Chris, are we anywhere near a test version yet?
Cyricx
07-25-2007, 05:05 PM
Very close. :)
O and the auto sub thing, goes through the class_dm_user so even new members subscribing, or join groups, or admincp, extra, any place you are changing the usergroups will also check for auto subs :)
Tralala
07-25-2007, 07:58 PM
Autosubscribe will be in 2.0!
Right now it's controlled from the usergroup manager, you set auto-subscribe to yes and enter the forumid's separated by commas of forums that when added to that usergroup the member can access.
This is awesome. Thanks so much for this, Cyricx... I think it'll fit my "users announcements" needs nicely now (especially since I've discovered that Super PM (https://vborg.vbsupport.ru/showthread.php?t=100314) doesn't work in 3.6.x :( )
Just to ask again though, since the question never got answered... if all I'm looking for is for threads and posts to get sent out via email -- but not to allow replies to those posts to be made via email -- can I still install and use this without the IMAP support? I'm assuming yes, just hoping the admin of it all makes sense. (I suppose if I'm not checking a mailbox, the cron never runs, so there's never an IMAP error, yes?)
And, can the emails be phrased so I can customize/remove the extra "reply" text (basically, telling folks that they have to log into the forum to respond?)
Thanks again. :up:
AyeCapn
07-25-2007, 08:25 PM
cyricx > *
Cyricx
07-25-2007, 08:31 PM
Just to ask again though, since the question never got answered... if all I'm looking for is for threads and posts to get sent out via email -- but not to allow replies to those posts to be made via email -- can I still install and use this without the IMAP support? I'm assuming yes, just hoping the admin of it all makes sense. (I suppose if I'm not checking a mailbox, the cron never runs, so there's never an IMAP error, yes?)
And, can the emails be phrased so I can customize/remove the extra "reply" text (basically, telling folks that they have to log into the forum to respond?)
Thanks again. :up:
Yes it can, you'll just need to disable the scheduled task that runs.
Also, the emails are completely phrased. The two you'll need to fiddle with to customize and remove the reply stuff will be "ei_notify_thread_forum" and "ei_notify_post_forum".
Since you are not going to use the email retrieval side of it you will not need imap.
But I must stress to everyone else that will be using email retrieval... be very careful fiddling with those phrases as the cron job looks for
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
and
You can also begin a new thread by sending an email to $foruminfo[ei_replyaddress]!
and cuts everything out between that to remove the signatures and the links from emails and posts. If you mess with either of those or remove them, signatures will get duplicated in posts and emails :)
But Tralala, since your talking about not using that retrieval, you won't experience any side effects from completely chopping up those phrases to your delight :)
Tralala
07-25-2007, 08:53 PM
Thanks, Cyricx!
This has the makings of being the Best. Mod. Ever...
and *certainly* worthy of MotM! :up:
Tralala
07-25-2007, 11:26 PM
Cyricx: I mentioned this earlier and you said you liked the idea. I'd been hoping to continue to give my users the option of getting instant email updates of only new threads, in addition to your hack's "all new threads and replies." (So I'd hoped to keep RedTyger's original hack (https://vborg.vbsupport.ru/showthread.php?t=141280) installed to allow for that.) In the meantime I just tried to make it work myself.
I edited the $vbphrase phrase of RedTyger's to read [i]"Instant notifications of new threads only."
I also edited yours -- $vbphrase[email_reply_integration] -- to read "Instant notifications of all new threads and replies" (instead of the default "Instant Notification by email")
Seems like it'll work. I'm hoping this is an easy way to get these hacks to peacefully coexist... and if not, maybe you could include both as options in your hack. Just figured I'd throw it out there to help others with the same hope.
It's also a bit counter-intuitive that to subscribe you go to the forum pulldown, select "Subscribe" and then choose what type... but to *unsubscribe* you can only do so from the UserCP. Ideally we'd be able to unsubscribe from the same forum pulldown... and in the absence of that, unsubscribing would be yet another listing on the "Notification Type" pulldown.
Thanks for the consideration.
Cyricx
07-26-2007, 01:30 AM
I'll update the phrase for my next version :)
I'm deadly close to taking the code I have no to the beta testers, so I think I'll look at the dropdowns and such in 2.5 or 3.0 or whatever. Which shouldn't be far behind the release of 2.0 :)
The phrase change will definately be in the 2.0 as I didn't realize I hadn't flopped those over :(
Updated - changed the phrase to read
Instant notification by email for new threads and replies
Love the input Tralala! Soon I'll be able to put these great ideas into action! :)
Tralala
07-26-2007, 02:08 AM
Idea for 2.5 or 3.0:
The ability for users to subscribe to individual threads of their choosing (and not whole forums) and receive *all* subsequent replies to said threads.
(The built in vB thread subscription mechanism only sends ONE, with the following disclaimer: "There may also be other replies, but you will not receive any more notifications until you visit the forum again.")
Cyricx
07-26-2007, 05:16 PM
Yep!! Completely agree. I had to disable that due to the queries not agreeing well, but I've learned alot more about building, constructing and fiddling with arrays. So it'll definately be on its way :)
I love this tech though.. can you imagine how this could be adapted even further??
Reply to PMs via Email :P
Possibilities are endless!!
Anyway, I've sent the 2.x version to a few beta testers, after they beat it up and fire a few reports back to me, I'll release it here. Should be just a day or two til the public release of 2.x
Which will have:
Auto subscriptions (with links to update subs)
phrased error messages
admin options to enable/disable each of the links in the emails
* Cyricx dances a jig!
tekguru
07-26-2007, 06:25 PM
And a report from me now in:)
BTW reply to PMs would be awesome- I was going to suggest that! :)
rbgrn
07-26-2007, 10:38 PM
I installed per the installation instructions and am having no luck. I didn't do anything regarding attachment restrictions (left all default) and commented out the require in php as directed (I don't have whatever thing installed that it wanted)
I'm trying to pull via pop/w SSL (official cert) from pop.gmail.com
My login and password are definitely correct, the login also includes @gmail.com
I set up a forum and enabled email integration
I set it as only my admin group for now can post or reply by email
When I run the job manually, it just sits forever and the page never finishes refreshing.
My questions:
Is there any kind of log or debug info here? Nothing shows up off the cron job on the info column when it runs.
What user will the emails come in as posted by??
Does the email account need to coordinate with some account on the forum?
Has anyone tested this with gmail?
Thanks!
rbgrn
07-26-2007, 10:42 PM
Another question:
Re: changes to "Instant Email Notification"
Does that apply globally now or is it only for forums that have Email Integration enabled?
I certainly don't want that behavior to change anywhere. I just want to pull emails into posts.
rbgrn
07-26-2007, 10:50 PM
Ok got it to run, gmail requires the self-signed cert option which really means use port 995, which should be the standard port. This may require some renaming :)
anyway, it runs now, but no mail comes in even when there's new mail in the box. :/
sdsvtdriver
07-27-2007, 06:50 AM
This mod looks great!
I do have a request, as this mod is the closest I've seen to do what I want.
We all know this mod allows a user to be on the forum and subscribe to a forum(or thread in the near future), then receive emails containing posts made since the subscription, and then reply.
What I'd like to see is for a user to be able to send email to their username.apasswordtheysetintheirCP@myvbforum.com and have a new post created in a predetermined forum.
This would be useful for people who like to take pictures and send them off to their blog, etc, however this would allow them to do so on the forums on the go.
Somewhat like textamerica. I have a plug-in from them on my blog. I sent my pic to myemail.mypassword@textamerica.com, they process it and it magically appears on my blog.
Would be useful for varying ideas, such as my car forum. If people see a cool car, they can shoot off the pic to their shorcut in their mobile phone's address book and a post is created with the MMS text and photo, instead of going home, emailing photo to yourself, putting it on photobucket, creating thread, etc. etc.
95% of the functionality (and hard part) seems to already exist in the code. A few mods such as the mobile post password field in the UCP, way to designate forum for mail with a username.password format @myvbforum.com, as opposed to their email address on file, etc.
Possible future enhancement?
Tralala
07-27-2007, 01:39 PM
:confused:
Why wouldn't they just send the pic to the mailboxes already used by this mod?
ie: general@myvbforum.com
Since the sending email address is cross-checked against the member's list, it's more or less just as secure. They can take pic, email it from the phone, and it gets posted. Am I missing something? What more does your request accomplish?
(In other words, this mod isn't just for replies, it's also for new threads too.)
Cyricx
07-27-2007, 02:15 PM
What user will the emails come in as posted by??
Has anyone tested this with gmail?
Thanks!
It'll match the sent email to the email address for the user on the board. If they match, rock on, it'll post as that user. If it doesn't they get an error message.
Tested with gmail incoming emails, but not with using a gmail account as the catch.
Another question:
Re: changes to "Instant Email Notification"
Does that apply globally now or is it only for forums that have Email Integration enabled?
I certainly don't want that behavior to change anywhere. I just want to pull emails into posts.
It only works for those forums that have it enabled. If you don't enable it for any forums, you will notice no changes at all :)
For the forum you enable, it will have the new subscription option available.
Ok got it to run, gmail requires the self-signed cert option which really means use port 995, which should be the standard port. This may require some renaming :)
anyway, it runs now, but no mail comes in even when there's new mail in the box. :/
This option is covered in the connection type dropdown.
Pop3 with self-signed certificate or IMAP with self-signed certificate both use port 995.
Please try all the connection types :)
Here is the break down of ports that are used.
// ##### Determining Connection Type ######
switch ($foruminfo['ei_connectiontype'])
{
case 0:
$connectmailserver = "{" . $foruminfo[ei_hostname] . ":110/pop3/notls}INBOX";
break;
case 1:
$connectmailserver = "{" . $foruminfo[ei_hostname] . ":143/novalidate-cert}INBOX";
break;
case 2:
$connectmailserver = "{" . $foruminfo[ei_hostname] . ":993/pop3/ssl}INBOX";
break;
case 3:
$connectmailserver = "{" . $foruminfo[ei_hostname] . ":995/pop3/ssl/novalidate-cert}INBOX";
break;
case 4:
$connectmailserver = "{" . $foruminfo[ei_hostname] . ":993/imap/ssl}INBOX";
break;
case 5:
$connectmailserver = "{" . $foruminfo[ei_hostname] . ":995/imap/ssl/novalidate-cert}INBOX";
break;
}
What I'd like to see is for a user to be able to send email to their username.apasswordtheysetintheirCP@myvbforum.com and have a new post created in a predetermined forum.
This would be useful for people who like to take pictures and send them off to their blog, etc, however this would allow them to do so on the forums on the go.
This is possible with the current code.
If a user is in a usergroup that is set in this setting in the forum manager -
Please enter the usergroup IDs that can post and reply by email.
They can send an email to the email address for the site and it will post. They do NOT have to be subscribed to the forum in order to start a new thread from email :)
rbgrn
07-27-2007, 05:07 PM
Cyricx - I've got everything working with a few modifications, here's my general experience feedback and breakdown:
1) The feature I need is simply to pull mailing-list emails into threads/posts
1a) I modified the code to figure out which thread an email should go into using the subject
1b) I commented out error mails or response mails as I don't want interaction
2) There is no cron logging working for this
2a) I tried adding some in the cron job php and changed the phrase to have {1} in it so that it'd show up, but for whatever reason (I'm new to vb) it does not still
2b) I recommend adding some informational and debugging logging as it's frustrating when things aren't working and you can't figure out why
2c) My recommended categories - Email Received, Email Sent, Error Email Sent, Other Errors
3) Configuration
3a) It'd be ideal to have configuration as a separate menu item rather than hang off the forum itself. Multiple select of forums would be excellent on a single configuration
3b) For my set up, I'd like to have an override user that ALL emails get posted as
3c) Also I'd like to pull email from one box and depending on who it's from, get delegated into different forums (for me that translates to multiple mailing list support off 1 account). Another solution would be supporting a box other than INBOX
3d) I'd like an option to globally shut off all outbound email, as I don't use that.
3e) I don't want any other behavior changed within my board
4) Security
4a) Email inherently is insecure to use for this as I can forge my From address and post as someone I'm not. There's not a lot you can do about that, unfortunately. Just a concern.
5) Code
5a) Your code is one monolithic block. It'll be easier for you to add features if you refactor it a bit, breaking it into logical blocks using methods or classes if it gets even bigger.
5b) Consider adding some debugging ability. It'd be nice for us hackers. :)
Of course it's easy for someone to sit back and criticize another's work, which is not what I'm trying to do. I really appreciate your time and think this is very valuable. I have different uses for it than what you intended initially and I'd consider polishing this off doing all of my above things and forking it off into a different project maybe called vBulletin Mail Pull or something of that nature. I may consider that if I get some more time to work on this in the future. For now, I'll create multiple mail boxes and users to go into the different forums for different mailing lists.
Thanks again for all your work.
Here's my modification to group threads together
// find thread with matching title 'Post'
// make reply if match
$baseTitle = preg_replace("/re: /", "", $title);
$baseTitle = preg_replace("/Re: /", "", $baseTitle);
$baseTitle = preg_replace("/RE: /", "", $baseTitle);
$queryResult = $vbulletin->db->query_first("
SELECT threadid
FROM " . TABLE_PREFIX . "thread
WHERE title = '$title' OR title = '$baseTitle' LIMIT 1
");
if ($queryResult['threadid']) {
$threadid = $queryResult['threadid'];
$type = "reply";
$cronlog .= "Found reply for thread $threadid";
}
// ##### Time To Post The Reply #####
if ($type == "reply")
{
// Building post info
rbgrn
07-27-2007, 05:31 PM
I added one more change in quick - hiding email addresses
// hide email addresses
$mailmessage = preg_replace("/[a-zA-Z0-9\-_]+@[a-zA-Z0-9\-_]+.[a-z]{2,4}/", 'xxx@xxx.xxx', $mailmessage);
rbgrn
07-27-2007, 05:55 PM
That was full of bugs. I forgot to specify the forum in the query. Oops. Here's the updated code
// hide email addresses
$mailmessage = preg_replace("/[a-zA-Z0-9\-_]+@[a-zA-Z0-9\-_]+.[a-z]{2,4}/", 'xxx@xxx.xxx', $mailmessage);
// find thread with matching title 'Post'
// make reply if match
$baseTitle = preg_replace("/re: /", "", $title);
$baseTitle = preg_replace("/Re: /", "", $baseTitle);
$baseTitle = preg_replace("/RE: /", "", $baseTitle);
$forumid = $foruminfo['forumid'];
$queryResult = $vbulletin->db->query_first("
SELECT threadid
FROM " . TABLE_PREFIX . "thread
WHERE forumid = $forumid AND (title = '$title' OR title = '$baseTitle') ORDER BY threadid DESC LIMIT 1
");
if ($queryResult['threadid']) {
$threadid = $queryResult['threadid'];
$type = "reply";
$cronlog .= "Found reply for thread $threadid";
}
// ##### Time To Post The Reply #####
if ($type == "reply")
{
// Building post info
sdsvtdriver
07-28-2007, 10:33 AM
:confused:
Why wouldn't they just send the pic to the mailboxes already used by this mod?
ie: general@myvbforum.com
Since the sending email address is cross-checked against the member's list, it's more or less just as secure. They can take pic, email it from the phone, and it gets posted. Am I missing something? What more does your request accomplish?
(In other words, this mod isn't just for replies, it's also for new threads too.)
This is possible with the current code.
If a user is in a usergroup that is set in this setting in the forum manager -
Please enter the usergroup IDs that can post and reply by email.
They can send an email to the email address for the site and it will post. They do NOT have to be subscribed to the forum in order to start a new thread from email :)
Thanks for the replies. I missed the feature where new threads can be creaed, not just replies posted. However, the user would have to have their mobile phone email address as their main email address for the site, correct?. I could see where people would want to be able to send texts and pictures from their phone and create new threads, however receive subscription/PM notifications to their email address.
Please correct me if I still am not understanding the functionality correctly.
Tralala
07-28-2007, 01:26 PM
My mobile phone (a Treo 700p) uses the same "email address" as my computer. So if I emailed a picture/attachment, it'd work.
But if you are talking about sending an MMS (multimedia SMS text message) as an email, yes, it'd be addressed from something like yourphonenumber@yourcellservice.com
US Based Carriers:
Alltel = xxxxxxxxxx@message.alltel.com
AT&T = xxxxxxxxxx@mms.att.net
Boost Mobile = xxxxxxxxxx@myboostmobile.com
Cingular (AT&T) = xxxxxxxxxx@mms.mycingular.com
Einstein PCS = xxxxxxxxxx@einsteinmms.com
Sprint = xxxxxxxxxx@messaging.sprintpcs.com
T-Mobile = xxxxxxxxxx@tmomail.net
US Cellular = xxxxxxxxxx@mms.uscc.net
Verizon Wireless = xxxxxxxxxx@vzwpix.com
Virgin Mobile = xxxxxxxxxx@vmobl.com
...and those wouldn't work, since it'd be unlikely that the person is using those as their "registered" email address.
Perhaps Cyricx can come up with additional allowance to allow for the processing of such SMS or MMS messages.
Cyricx
07-30-2007, 02:17 PM
Cyricx - I've got everything working with a few modifications, here's my general experience feedback and breakdown:
1a) I modified the code to figure out which thread an email should go into using the subject
I'd advise against doing it this way.. There is a good chance you will have more then one thread with the same name across all your forums... the thread id is a much more certain route. Not to mention some email programs to different formating with RE: and FW:. This is the reason my current code works off the thread id :)
2) There is no cron logging working for this
2a) I tried adding some in the cron job php and changed the phrase to have {1} in it so that it'd show up, but for whatever reason (I'm new to vb) it does not still
2b) I recommend adding some informational and debugging logging as it's frustrating when things aren't working and you can't figure out why
2c) My recommended categories - Email Received, Email Sent, Error Email Sent, Other Errors
Yeah.. I'm still learning the cron logging system and trying to learn how to log those. I know zero about the cron logs yet, so that's definately on my list :)
3) Configuration
3a) It'd be ideal to have configuration as a separate menu item rather than hang off the forum itself. Multiple select of forums would be excellent on a single configuration
3b) For my set up, I'd like to have an override user that ALL emails get posted as
3c) Also I'd like to pull email from one box and depending on who it's from, get delegated into different forums (for me that translates to multiple mailing list support off 1 account). Another solution would be supporting a box other than INBOX
3d) I'd like an option to globally shut off all outbound email, as I don't use that.
3e) I don't want any other behavior changed within my board
So you allow incoming email? but not outbound? so the whole subscription thing, you don't need? Hmm... so your only using it to start new threads in forums?
4) Security
4a) Email inherently is insecure to use for this as I can forge my From address and post as someone I'm not. There's not a lot you can do about that, unfortunately. Just a concern.
Completely agree. I'm brainstorming ideas to help secure it more without making it any more complex for the end user.
5) Code
5a) Your code is one monolithic block. It'll be easier for you to add features if you refactor it a bit, breaking it into logical blocks using methods or classes if it gets even bigger.
5b) Consider adding some debugging ability. It'd be nice for us hackers. :)
The cron files HATE functions... I used to have the mail error code in a function and I had to create a list of all the variables I wanted to go through the function as it doesn't seem to accept global functions when embedded in the file.
Of course it's easy for someone to sit back and criticize another's work, which is not what I'm trying to do. I really appreciate your time and think this is very valuable. I have different uses for it than what you intended initially and I'd consider polishing this off doing all of my above things and forking it off into a different project maybe called vBulletin Mail Pull or something of that nature. I may consider that if I get some more time to work on this in the future. For now, I'll create multiple mail boxes and users to go into the different forums for different mailing lists.
Thanks again for all your work.
I totally appreciate the ideas and input.
I think I saw in your block how to add to the cron log, so that may make it into an upcoming version.
All - My apologies for the delay in the next version, there was a few bugs found that I need to work on and unfortunately this weekend some RL fit hit the shan so things have been very hectic. Slight delay in the next version unfortunately :(
Cyricx
07-30-2007, 02:19 PM
My mobile phone (a Treo 700p) uses the same "email address" as my computer. So if I emailed a picture/attachment, it'd work.
But if you are talking about sending an MMS (multimedia SMS text message) as an email, yes, it'd be addressed from something like yourphonenumber@yourcellservice.com
US Based Carriers:
Alltel = xxxxxxxxxx@message.alltel.com
AT&T = xxxxxxxxxx@mms.att.net
Boost Mobile = xxxxxxxxxx@myboostmobile.com
Cingular (AT&T) = xxxxxxxxxx@mms.mycingular.com
Einstein PCS = xxxxxxxxxx@einsteinmms.com
Sprint = xxxxxxxxxx@messaging.sprintpcs.com
T-Mobile = xxxxxxxxxx@tmomail.net
US Cellular = xxxxxxxxxx@mms.uscc.net
Verizon Wireless = xxxxxxxxxx@vzwpix.com
Virgin Mobile = xxxxxxxxxx@vmobl.com
...and those wouldn't work, since it'd be unlikely that the person is using those as their "registered" email address.
Perhaps Cyricx can come up with additional allowance to allow for the processing of such SMS or MMS messages.
Hmmm,
yeah I'd have to think about this, could prolly do it with a user option where they listed alternate email addresses by line or separated by a comma with no spaces so that it forms an array that could be checked against.
Something to consider for 3.0 :)
rbgrn
07-30-2007, 03:53 PM
Ok last time: here's my code with bugfixes.
// hide email addresses
$mailmessage = preg_replace("/[a-zA-Z0-9\-_]+@[a-zA-Z0-9\-_]+.[a-z]{2,4}/", 'xxx@xxx.xxx', $mailmessage);
// find thread with matching title 'Post'
// make reply if match
$baseTitle = preg_replace("/re: /", "", $title);
$baseTitle = preg_replace("/Re: /", "", $baseTitle);
$baseTitle = preg_replace("/RE: /", "", $baseTitle);
$forumid = $foruminfo['forumid'];
$queryResult = $vbulletin->db->query_first("
SELECT threadid
FROM " . TABLE_PREFIX . "thread
WHERE forumid = $forumid AND (title = '" . $vbulletin->db->escape_string($title) . "' OR title = '" . $vbulletin->db->escape_string($baseTitle) . "') ORDER BY threadid DESC LIMIT 1
");
if ($queryResult['threadid']) {
$threadid = $queryResult['threadid'];
$type = "reply";
$cronlog .= "Found reply for thread $threadid";
}
// ##### Time To Post The Reply #####
if ($type == "reply")
{
// Building post info
rbgrn
07-30-2007, 03:56 PM
Cyricx - All I'm using it for is to read email from a mailing list and piece together the threads. No replies are allowed on the forum. It's just informational.
I also don't want people to be able to email in replies right now. I can't use threadid because the threads aren't being replied to from the forum. I have to do a gmail-style subject match to make it all work. I understand the limitations but it's all I can do.
functions work just fine in cron jobs, you just need to watch your scope.
Cyricx
07-30-2007, 03:57 PM
Okay, so what happens if you have two threads titled
"Hey read me!"
in the same forum?
One of those could be a year old :)
Your query would add the posts to the oldest thread, rather then the newest and correct thread :)
The hiding email address preg, is a great idea! my newest version being debugged right now pulls out the To: emailaddress line completely out but your idea is a much better one :)
Cyricx
07-30-2007, 03:59 PM
That's where I'm getting confused then :)
How are the threads being replied to? I mean... how are they getting the emails that they are replying too?
if your not allowing replies, why are you applying emails as replies to a thread? :)
Cyricx
07-31-2007, 06:53 PM
Just a few more cleanups to do with Pocomail then I'll release the 2.x version :)
fxs158
08-01-2007, 02:26 AM
looking forward to it,
Cyricx
08-01-2007, 05:15 PM
Added version 2.1!
This has been tested on 3.6.8!
AyeCapn
08-01-2007, 05:19 PM
w00t!
tekguru
08-01-2007, 05:56 PM
.. and the testing was fun too! Superb Mod!
fxs158
08-02-2007, 11:25 AM
is this mod ready for a liveboard?
Cyricx
08-02-2007, 11:30 AM
Yes it is. :)
Corys8646
08-02-2007, 01:20 PM
Great job on the updated version! Lots of great new features
the only problem I am seeing is that the incoming mail is still not being seen at HTML by my email client (thunderbird)
I'm getting raw headers and html tags in the body..
is anyone else seeing this behavior? think it's related to thunderbird only since webmail seems to be rendering properly, but I can also view other html emails just find in thunderbird.
Should there be a html tag in the header of the email?
thanks
fxs158
08-02-2007, 01:21 PM
ok installed, testing. found one bug. When I receive email, the link on the email that says " "reply to this topic" puts a space on php as follows;
/forums/showthread.ph p?t=4167
and the link does not work as a result.
Corys8646
08-02-2007, 01:29 PM
I'm not seeing the space you are talking about...all the links in the footer look good here.
Cyricx
08-02-2007, 01:31 PM
the only problem I am seeing is that the incoming mail is still not being seen at HTML by my email client (thunderbird)
I'm getting raw headers and html tags in the body..
Can you forward me a copy of this email to cyricx(at)mmogcommunities(dot)com?
ok installed, testing. found one bug. When I receive email, the link on the email that says " "reply to this topic" puts a space on php as follows;
/forums/showthread.ph p?t=4167
and the link does not work as a result.
What settings do you have for the included links in emails? For example do you have them all off, or on?
If on, which ones do you have turned off and which ones turned on?
fxs158
08-02-2007, 01:40 PM
Allow Attachments?
Do you wish to process attachments in emails?
Yes
Allow all attachment types?
Do you wish to allow all attachment types from emails? If so, select yes. By selecting no, an error message will be sent to anyone who tries to send an email with attachment types that are not listed in the Attachment Manager.
No
Enable Forum Links
If set to Yes this will enable the below links in the footers of emails. If no, no links will display for any of the below items regardless of their individual settings.
Yes
Homepage Link?
Do you wish to enable the homepage link in the emails?
Yes
Forums Link?
Do you wish to enable the forums link in the emails?
Yes
Calendar Link?
Do you wish to enable the calendar link in the emails?
No
Memberlist Link?
Do you wish to enable the memberlist link in the emails?
No
Search Forums Link?
Do you wish to enable the search forums link in the emails?
Yes
The other email links show fine, just the one posted above has the space between php to ph p and that causes link to be bad. the unsubscribe link does not seem to be properlly formated either.
Also could you tell me how to enable cron or whateverscript to pull the emails from my server into this program.
Cyricx
08-02-2007, 01:42 PM
The cron is automatically enabled, it's ported with the product xml :)
Set your settings up in the forum manager, and then try running the cron from the scheduled tasks manually to be certain your connection type is correct. If it is, it'll say Done!, if it isn't you'll get one of the errors listed in the first post of FAQs :)
Is that link coming up bad for a newthread, or a new reply? Or is it coming up bad for both for you?
fxs158
08-02-2007, 01:49 PM
I am gettting this error
Email Integration
Warning: require_once(/public_html/forums/includes/functions_threadprefix.php) [function.require-once]: failed to open stream: No such file or directory in /includes/cron/emailintegration.php on line 43
Fatal error: require_once() [function.require]: Failed opening required '/public_html/forums/includes/functions_threadprefix.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /public_html/forums/includes/cron/emailintegration.php on line 43
will try all settings to see if it works.
Corys8646
08-02-2007, 01:51 PM
did you comment out the thread prefix line in the cron job? assuming you aren't using the mod
fxs158
08-02-2007, 01:56 PM
did you comment out the thread prefix line in the cron job? assuming you aren't using the mod
that took care of it! Thanks! messages importing just fine!
cynthetiq
08-02-2007, 04:56 PM
What about filtering out spam emails?
mail2forum (http://mail2forum.com/forums/index.php) has a method of using regex to setup rules that the inbound emails are checked against.
my phpbb forum keeps out alot of extra spam that way. Is there something in this mod that does handle it as well?
Cyricx
08-02-2007, 05:02 PM
Spam emails would have to come from one of your users or be configured to match the email address of one of the users.
I've never used or messed with regex, so I'd have to do some reading on that to see how it works.
Cyricx
08-02-2007, 05:07 PM
Actually... wait, if I understand the description of regex correctly, I'm doing that already...
it's using preg_match and preg_replace, which I do.
Exactly what does m2f do to match a user to an email? (don't have time to dig through all their code and decode it all to figure it out :) )
fxs158
08-02-2007, 05:34 PM
I am not sure I understand how the mod works, however the more I think about it; I am a little concerned about security.
Could someone just fake my email address and post as me?
Cyricx
08-02-2007, 05:42 PM
Not any way that I know how. At least not without having access to your outgoing mailserver and password.
Even for example, yahoo, when I set it up to look like I'm sending email from cyricx(at)mmogcommunities(dot)com when someone reads my emails, it'll show as coming from that address, and reply to will be to that address.
While that email address is actually a forwarder that forwards email to my yahoo account.
When I send an email to the site to be processed as a post, it sees my yahoo address. It ignores all the reply to and sending as junk. Goes straight to the guts :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.