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)

Cyricx 09-20-2007 05:54 PM

Quote:

Originally Posted by FleXy (Post 1340867)
great mod, but I can not find information how user can define himself by mail...
This plugin use email address to know "user login"? I mean "to know who wrote by mail" ?

If yes, it's not secure, because anybody can send letters from any email address. I mean i can send email from support @ microsoft [dot] com etc.
email is WRONG choose to define user. So it's loophole for spammers....

p.s. sorry for my english.

The security offered in the modification I have written is just as secure as yahoo email groups. :)

It does offer some difficulty in that the code I'm using also checks the domain name that sent the email.

I am looking into ways to possibly embed security words into the header, but that will be a bit down the line.

Right now I'm happy with it being just as secure as the yahoo email groups that have such a high popularity :)



Linnov - You can try calling the exec_send_notification function. Here is the code to call that function as cut from the functions_newpost.php file

Code:

  exec_send_notification($threadinfo['threadid'], $vbulletin->userinfo['userid'], $post['postid']);
You will need to fiddle with your code to get the threadid and postid determined.

Unfortunatley I don't have alot of time to dig into the code you posted to say how to set those variables :(



Currently... I'm getting my ass kicked by functions called from cron jobs... I've almost got vbmail working to process emails, just getting hammered by trying to rebuild the email headers through the cron job. Bear with me all.

linnov 09-20-2007 07:16 PM

okies thanks I'll give it a whirl

FleXy 09-20-2007 10:29 PM

Cyricx, thanks for the answer, what do you think about add addition password for every user who use "Email integration tools"... I mean that user must provide "mail password" in every email body if he would like to add comments. its more secureв way...

Other question: can I block comments by mail for use by members? and use only new threads notification for users.

Cyricx 09-21-2007 11:43 AM

Quote:

Originally Posted by FleXy (Post 1343426)
Cyricx, thanks for the answer, what do you think about add addition password for every user who use "Email integration tools"... I mean that user must provide "mail password" in every email body if he would like to add comments. its more secureв way...

Other question: can I block comments by mail for use by members? and use only new threads notification for users.

I am strongly working to avoid the password required. Due to it having the same, and actually a touch better security then the yahoo groups that are so wildly popular I'm pretty comfortable with it. I believe that requiring a password will remove the usefulness and the general acceptance from the users for this mod. Most of them can't remember their passwords as it is :)

To the other question, you can restrict it by usergroup. New thread notifications do not work hand in hand with forum notifications... yet... that's a plan for the future.

Right now my focus is being dumped into getting this to work with vbmail. Right now I'm having serious issues getting the email headers to rebuild via the cron job so... everything is hinged on getting that working.

FleXy 09-22-2007 08:35 PM

thanks for the answer

about the passwords you can add checkbox for the administrators and give them opportunity to choose use passwords feature or not.

I will go to look at vbmail, I does not use this system.

wassonline 09-24-2007 02:44 PM

Hi

I downloaded and installed this mod today, but am having no joy what-so-ever with it.

I am not getting any errors appear when I run the Cron job, but then the system isn't working either.

I have set up the new mailbox, set up the user permissions as well as the forum things as per the instructions, but nothing seems to happen. I continue to receive notification e-mails from the normal e-mail account, and even when I send a new e-mail as a test to the new mailbox, and run a cron job, it doesn't post it (although it does appear to pick up the e-mail which is odd)

Please let me know if anyone has any possible suggestions! I can provide more info if needed

Thanks
David

dot2slash 09-25-2007 11:01 AM

is therea option to automate thumbnails for picture attachments ??

somehow this is not working ...

also if i send a png file (lowecase filename with numbers)
i get the log:
Code:

Newthread added from AltF4
to forum Warteschleife
Attachment invalid extension JPG: AltF4

mail answer:
Code:

We're sorry, but we could not process
your emailed reply / new thread.

You tried to upload a file with the extension type of JPG.
That extension type is not permitted.

any idea ?

MikeH2911 09-26-2007 06:12 PM

Has the gmail issue been solved yet? Last time I checked emails in my gmail account appear as raw html still. Gmail is the only problem I'm having with this mod but seeing as so many people using the small forums I've setup to use this feature use gmail it's a major impediment.

Thanks

Mike

doubleclick 09-26-2007 06:14 PM

Quote:

Originally Posted by popmyzit (Post 1332878)

now i am getting:

Warning: imap_open() [function.imap-open]: Couldn't open stream {localhost:110/pop3/notls}INBOX in /includes/cron/emailintegration.php on line 111

Warning: imap_headers(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 114

Warning: imap_close(): supplied argument is not a valid imap resource in /includes/cron/emailintegration.php on line 1213

I'm getting the same thing. I'm sure I have plain POP, but tried the other 5 options as well and it made no difference.

Help?

dc3dreamer 09-26-2007 08:32 PM

Quote:

Originally Posted by Cyricx (Post 1343787)
I am strongly working to avoid the password required. Due to it having the same, and actually a touch better security then the yahoo groups that are so wildly popular I'm pretty comfortable with it.

I made a post to this effect a couple of months ago, but it bears repeating: Please don't cobble up Email Integration with password security or other stuff. Spam protection does not belong in this system! It is rightly the responsibility of AV/AS software that manages that stuff system-wide.

-- Bob

doubleclick 09-27-2007 10:55 AM

Hi Bob-

Sorry for the misunderstanding.

The FORUM is password protected, and has been long before I knew this mod existed. It has nothing to do with spam: it is a private forum for a group that doesn't want the world to view it.

Anyway, I temporarily removed the password temporarily to reduce the list of suspects. Even without a password I still get the error I reported.

How can I correct this error?

doubleclick 09-27-2007 11:34 PM

ok. got past the imap error. Turns out this error message isn't just about which of the 6 connection type settings to use.

Now, the emails are posting, but there is a bunch of code preceeding and following the text.

for example, I just replied to a post via email with "did this work?"

The post in the forum reads:

Message BODY { FONT-FAMILY: Verdana, Geneva, Arial, helvetica, sans-serif } TABLE { MARGIN-TOP: 1em; BACKGROUND-COLOR: #ffff66 } TD { FONT-SIZE: 80%; FONT-FAMILY: Verdana, Geneva, Arial, helvetica, sans-serif } TH { FONT-SIZE: 80%; FONT-FAMILY: Verdana, Geneva, Arial, helvetica, sans-serif } did this work?

I tried html on and html off for that forum and for the usergroup that uses it, but the results were the same in both cases.

Also, two quote boxes show up in each email post. one is who it is from (which we already know from the postbit) and the second quote box copies the original post, (which we already know from the thread)

How do I strip out the code and just get the text of the reply?

.

Thanks

doubleclick 09-28-2007 04:52 PM

I see this same question was asked at the beginning of the month as well, and no answer was posted.

https://vborg.vbsupport.ru/showpost....&postcount=395

Did somebody answer him in a PM or does nobody here know the answer?

Cyricx 10-01-2007 02:12 PM

That's an issue witht he preg_replace code and my attempts to quote the previous posters message.

The new version has a completely new set of preg_replace code written for it that I'll need to test out heavily, but right now that version is still hanging on some issues I'm working on with using the vbmail function from a cron job and rebuilding the message headers.

As soon as I solve that problem, things will progress quickly to releasing the new version.

Unfortunately my job and family come first so time has become a little constrained as of late, so I'm unable to define an eta for the next version. :(

Cyricx 10-01-2007 02:13 PM

Quote:

Originally Posted by dot2slash (Post 1346708)
is therea option to automate thumbnails for picture attachments ??

somehow this is not working ...

also if i send a png file (lowecase filename with numbers)
i get the log:
Code:

Newthread added from AltF4
to forum Warteschleife
Attachment invalid extension JPG: AltF4

mail answer:
Code:

We're sorry, but we could not process
your emailed reply / new thread.
 
You tried to upload a file with the extension type of JPG.
That extension type is not permitted.

any idea ?

Hmmm. Do you have PNGs as an available attachment type in your admincp -> attachment manager?

Cyricx 10-01-2007 02:15 PM

Quote:

Originally Posted by doubleclick (Post 1348606)
ok. got past the imap error. Turns out this error message isn't just about which of the 6 connection type settings to use.

Your correct, it has to do with connecting to the box period. This can be the username, password, the host and the connection type. Unfortunately there is no way to discern which of those is causing the issue.

It's usually pretty easy to double check the username and password, that leaves you with trying "localhost" the IP Address or mail.yourdomain.com as the host and then trying the connection types.

Typically at least that's the most common issues.

doubleclick 10-01-2007 05:56 PM

Quote:

Originally Posted by cyricx
The new version has a completely new set of preg_replace code written for it that I'll need to test out heavily, but right now that version is still hanging on some issues I'm working on with using the vbmail function from a cron job and rebuilding the message headers.

Is there some way for me to hack at the old code and make it stop with the html and quote dump in the meantime? Just put in plain ol' text?

I didn't realize this mod wasn't finished, and promised a group of users I'd implement it. can you at least tell me where to comment out the invitation to post new threads and reply via email in the outgoing email to users so they don't? That would be a good bandaid until you get time to finish this.

Cyricx 10-01-2007 07:19 PM

Unfortunately there is no easy quick fix. Even if you forced it to use plain text, many email browsers only send an html formatted email, which would gain you blank messages from those users.

cgmckeever 10-01-2007 08:43 PM

Doubleclick - contact me off list..I actually hacked the code and made it exactly what you are looking for....if there is a plaintext message, it uses that over the HTML, and only falls to the HTML if there is nothing else.

It also does some smart quoting of the original ...
I do think it ignores most BB markup except URL

Its just a replacement of one file .. but it does fork the code ...

user: cgmckeever
provider: gmail

Cyricx 10-01-2007 08:51 PM

Cgmckeever -

I'd love to compare the code for the rewrite I've got coming down the line. Would you mind sending me a copy?

cgmckeever 10-02-2007 12:31 PM

C - just sent it out to you -- it pretty much ripped all the regex and HTML out and pushed everything as plaintext and tried to figure out where URLS should be placed.

Cyricx 10-02-2007 12:32 PM

Rock on, I still had that email saved.

Thanks!

I'm hoping to have some time to dive back into the vbmail thing today.

doubleclick 10-02-2007 10:28 PM

cyricx:
What about the second half of the question?
Quote:

Originally Posted by doubleclick
can you at least tell me where to comment out the invitation to post new threads and reply via email in the outgoing email to users so they don't? That would be a good bandaid until you get time to finish this.

cgmckeever:
Thanks for the assistance. I've sent you email.

cgmckeever 10-03-2007 12:21 AM

Doubleclick - just PM'd you - didnt get an email

whoops --- posted a comment about how to nuke the footer, but it wouldnt work

;)

cgmckeever 10-03-2007 12:25 AM

Doubleclick -

the footer comes out of a template phrase from the database...

I think if you added something like:

Code:

$pattern[3] = "/-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-(.*)-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-/is";
      $replace[3] = "";
      $pattern[4] = "/-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-(.*)-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-/s";
      $replace[4] = "";
      $mailmessage = preg_replace($pattern, $replace, $mailmessage);

right after:

Code:

$text_message = str_replace("\\'", "'", addslashes(iif(empty($email_text['emailbody']), $emails['-1']['emailbody'], $email_text['emailbody'])));
It _should_ wipe out the footer from the message. You would have to do this for the CRON and PRODUCT xml in I think 4 places (2 per file)

This is untested, but the replace is the same replace that wipes out the footer in replies to posts via email.


C -- maybe an option in EI to disable the footer?

doubleclick 10-03-2007 01:57 PM

Thanks again, cmg. I resent the email to you.

As far as disabling the footer via EI in the future, maybe the option to disable each option individually through the admin panel, rather than a big either/or decision. As it stands, it's nice to have the view thread in forum, homepage, and especially the unsubscibe options remaining and just being able to remove the reply/post from email options.

I'm off to try your new code, cmg. I'll let you know how it goes.

DC

Cyricx 10-03-2007 02:09 PM

Quote:

Originally Posted by doubleclick (Post 1352139)
Thanks again, cmg. I resent the email to you.

As far as disabling the footer via EI in the future, maybe the option to disable each option individually through the admin panel, rather than a big either/or decision. As it stands, it's nice to have the view thread in forum, homepage, and especially the unsubscibe options remaining and just being able to remove the reply/post from email options.

I'm off to try your new code, cmg. I'll let you know how it goes.

DC

The option to disable the links like calendar and such is worked into the next version. I'll check into adding the others in a future version.

Right now the vbmail problem is gonna make my brain explode. :)

doubleclick 10-04-2007 07:17 PM

ok. I figured out a simple fix, that even I can deal with.

I went to phrases via the vBulletin Admin Panel, did a search for "you may reply to this email",

I then edited the following English (US) Translation versions

ei_notify_post
ei_notify_post_forum
ei_notify_thread
ei_notify_thread_forum


and then commented out this part of the code following $emaillinks :

<tr> <td align="center">You may reply to this email to post a reply to the forum.<br>You can also begin a new thread by sending an email to <a href="mailto:$foruminfo[ei_replyaddress]">$foruminfo[ei_replyaddress]</a>!</td> </tr>

That removes the part of the footer dealing with reply and starting threads via email. I like this as it retains the rest of the useful features, and when your new fixes eliminate the html code dump and quote boxes, I can just uncomment this out again.


This fix still created quote boxes when clicking the link from the email to reply via the forum, but I can live with it. At least the HTML dump is not there.

I really don't like the redundancy of quote boxes, but realize this is a personal preference and not a global one. I hope you'll consider making quote box creation an option as well, assuming your head doesn't explode in the meantime. :)

Hope this helps somebody...

DC

doubleclick 10-05-2007 11:07 PM

Well, so far so good. The mod is working for the forum and it seems to be increasing responses.

I just tried to enable it with another usergroup/forum combination, but for some reason, it isn't sending out notifications of posts or replies made in the forum. It does, however, post in the forum if an email is sent to that forum's designated email address.

I set myself as a member of the usergroup that has access to the forum, and selected "instant email notification" for that forums forum options.

I've compared the settings many times for the one that works with the one that doesn't, and can't see what the problem is. Any ideas? I'm sure it's something staring me in the face, but I sure as heck can't see it.

doubleclick 10-09-2007 12:49 AM

One forum is still working, the other one isn't. As far as I can tell, the settings are all correct. Checked the settings for the one that isn't working for about the 10th time, and still can't find what I've missed.

From forum manager, it has the correct usergroup enabled in email integration. Other settings identical to the one that works.

from usergroup manager, it has the correct forum enabled for email reply, both are set to yes
Users are assigned to correct user group. Other settings identical to the one that works.

Users are assigned to the correct usergroup.

Forum permissions are identical for both forums and their respective usergroup.

Finally, if I send email to the forum that doesn't work, it posts the email. However, when a post is made, it doesn't send notification.

More than one forum can do this, right?

mrahul 10-09-2007 06:20 AM

does this work on 3.6.4 ?

Cyricx 10-09-2007 11:57 AM

Doubleclick - Do you have a separate email address for each? Each forum has to have it's OWN email address.

Mrahul - Yes


All - I'm going to move on with the code, I don't have vbmail working yet from the cron job, but I'm going to move forward with my next release and see if I can get the vbmail in crons working for a future release. Global variables do not work well in a function when ran from an automated cron job.

kube 10-10-2007 01:59 PM

Quote:

Originally Posted by ChurchMedia (Post 1314010)
Man, you ROCK!! This is up and running on my board and almost everything is working perfectly. The only bug I've seen is that is this:

>> Create a new thread by email
>> Put a smilie in it :)
>> The smilie shows up fine in the forum
>> When you get the email back the smilie is a broken link
Code:

<img src="images/smilies/smile.gif" border="0" alt="" title="Smilie" class="inlineimg" />
The http://www.yoursite.com/forums/ is missing. This seems to only be on new threads. Replies are fine.

I`ve the same problem - anyone who knows how to fix it ?


Just testing at the moment - but seems to be the best hack i`ve installed....

thanks for that !

doubleclick 10-11-2007 11:19 AM

Quote:

Originally Posted by doubleclick
Doubleclick - Do you have a separate email address for each? Each forum has to have it's OWN email address.

yes.

====


Also a suggestion while you're working on the code:

The emails that go out have an "unsubscribe" option, as it should. I'd like to see a link that allows them to change their notification options: 1x day, 1x week, as it is already setup in vbulletin. That gives more options than the yes/no one now available.

Dale

Crys 10-13-2007 01:45 PM

Hi there,

I managed to get new threads to open using e-mail but how does the reply part work? I've been testing with multiple test users and I still haven't received any e-mails from the forum e-mail I set up. Can you help me on this please?

Many thanks!

~ Crys ^^

kube 10-13-2007 09:04 PM

Quote:

Originally Posted by Crys (Post 1358951)
Hi there,

I managed to get new threads to open using e-mail but how does the reply part work? I've been testing with multiple test users and I still haven't received any e-mails from the forum e-mail I set up. Can you help me on this please?

Many thanks!

~ Crys ^^

Did you subcribe to that forum ?

Crys 10-13-2007 10:57 PM

Yes, I tried to subscribe to the forum but the reply e-mail that it provides shows the main forum e-mail and not the forum specific e-mail. I also tried replying to that e-mail, just in case, but it never showed up, as a reply, in that specific thread.

~ Crys ^^

MikeH2911 10-14-2007 07:24 PM

Quote:

Originally Posted by Cyricx (Post 1356187)
All - I'm going to move on with the code, I don't have vbmail working yet from the cron job, but I'm going to move forward with my next release and see if I can get the vbmail in crons working for a future release. Global variables do not work well in a function when ran from an automated cron job.


Is the vbmail the thing thats making gmail dump html in posts received from the forum?

Mike

Reeve of shinra 10-15-2007 04:09 AM

I'm amazed the mod was so easy to install -- in the past, whenever I saw a email to forum type mod it required a bazillion file edits to get working so major kudos there!

I am running into the follow error however when i try to run the cron job and test this out. I assume this is an error with my imap config, yes?

Code:

Fatal error: Call to undefined function: imap_open() in /home/social/domains/socialartist.com/public_html/forum/includes/cron/emailintegration.php on line 111
Thanks!

edit: Nevermind, found the answer here:
https://vborg.vbsupport.ru/showpost....&postcount=356

MikeH2911 10-15-2007 01:50 PM

A little help, the hack is installed and working just fine, but only in one forum. The test forum I created to see if this hack works (a hidden section of the forums), in the actual forum I want it to work in nothing happens despite all the settings and permissions being identical.

Any idea why?

Mike


All times are GMT. The time now is 07:54 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03292 seconds
  • Memory Usage 1,871KB
  • 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
  • (9)bbcode_code_printable
  • (13)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