vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - Email Integration (New threads/replies by email) (https://vborg.vbsupport.ru/showthread.php?t=151222)

Renada 07-17-2007 08:52 PM

Hi Cyricx,

I'm now getting this error when running the scheduled task.

Code:

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:

Code:

  $title = htmlspecialchars_decode($title);
and change it to

Code:

//  $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

Quote:

Originally Posted by Cyricx (Post 1294014)
On line 130 of the emailintegration.php find:

Code:

  $title = htmlspecialchars_decode($title);
and change it to

Code:

//  $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:

Code:

Email Integration

Warning: imap_open() [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:

Code:

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

Quote:

Originally Posted by Renada (Post 1294103)
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:

Code:

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

Code:

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

Quote:

Originally Posted by txspaderz (Post 1294137)
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

Quote:

Originally Posted by rustybones (Post 1294147)
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

Code:

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

Quote:

Originally Posted by txspaderz (Post 1294171)
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

Quote:

Originally Posted by txspaderz (Post 1294169)
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

Quote:

Originally Posted by txspaderz (Post 1294195)
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

Quote:

Originally Posted by InTheBox (Post 1294232)
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

Quote:

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

Quote:

Originally Posted by Cyricx (Post 1293809)
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

Quote:

Originally Posted by moonray (Post 1295120)
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

Quote:

Originally Posted by subnet_rx (Post 1295137)
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

Quote:

Originally Posted by rustybones (Post 1295177)
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

Quote:

Originally Posted by txspaderz (Post 1295344)
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

Quote:

Originally Posted by txspaderz (Post 1295345)
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

Quote:

Originally Posted by Corys8646 (Post 1295085)
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 :)


Quote:

Originally Posted by moonray (Post 1295120)
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.


Quote:

Originally Posted by subnet_rx (Post 1295137)
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 :)


Quote:

Originally Posted by rustybones (Post 1295289)
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

Quote:

Originally Posted by vocoder (Post 1295669)
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.


All times are GMT. The time now is 12:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02259 seconds
  • Memory Usage 1,897KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_code_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete