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)

riahiarshia 07-18-2008 05:35 PM

It seems to work just fine using a gmail account.

kevinh 07-19-2008 12:26 AM

Alex, my experience with this is that it happened with the same user (who had previously posted by email without the repeat posts occuring). Ironically he was one of the few people who helped us test EI, but the problem only occurred after we went live, although fortunately we're still beta testing with 12 users.

So I [S]don't[/S] do think it is random. It's a pretty big problem for me, because I'm in Australia but many of my users will be in the UK, so if the problem occurs it's likely to happen when I'm asleep, and by the time I know about it I will have a lot of unhappy users!

Incidentally I already had 'Strict Email Checking' to set to 'NO'.

kevinh 07-19-2008 12:38 AM

In the mean time I am trying to disable posts by email while retaining the notifications.

I have modified the phrases for the new thread and new post emails so that they no longer contain the 'reply between the lines section' and make no reference to replying or starting threads by email. It's a bit of a bodge but it will work. However, in the notification emails I am getting far too much space above and below the previous message section.

I'm assuming this must be down to a php file - can someone please tell me which file it is that creates these email message?

toivo 07-19-2008 12:57 PM

Hi Kevin.

Have you tried the fixes listed in reply #843? I had a similar problem with messages not getting deleted and a small change fixed that.

If the message has no attachments, the variable $attachmentinfo in the phrase ei_post_notify_html for emailbody is blank and there will be three lines above the previous message section. The processing is done around lines 726-822 in emailintegration.php, and $parentpost is done after that.

Regards,
toivo

kevinh 07-20-2008 05:31 AM

Quote:

Originally Posted by toivo (Post 1579023)
Hi Kevin.

Have you tried the fixes listed in reply #843? I had a similar problem with messages not getting deleted and a small change fixed that.

I hadn't, no. Because people were still talking about the problem in very recent posts I figured there wasn't a fix so didn't bother to go back through the 50 of pages of posts :o

Many thanks for drawing this to my attention. I will make the relevant changes and report back!

kevin

kevinh 07-20-2008 08:07 AM

Hi toivo,

[S]I have a problem with your fix below - my line 1615 says;

if (empty($evalemailplain))

however I have this on line 1814;

$plaintext_parser->set_parsing_language($touser['languageid']);

I'm not a coder so I need to very precise instructions :)[/S]

In your post below I assume the code you have after "Line 1615" is the new code?

[S]But what do I replace with it ? (obviously not line 1615 in my emailintegration.php file)[/S]

Regards,
Kevin

PS. I am running EI 2.6.1 Beta

Quote:

Originally Posted by toivo (Post 1492963)
Hi,

Here is a workaround to the problem which stops messages from being deleted:

Force the language code, rather than retrieve it from $touser['languageid']:

Line 1615:

$plaintext_parser->set_parsing_language( 1 );

I sent three messages to the mailbox, hit the forum a few times and received all three messages. And they had been deleted from the mailbox, too.

Regards,
toivo


toivo 07-20-2008 08:21 AM

Hi Kevin,

Quite right, that is the new code.

Odd, the original version of emailintegration was under 1700 lines.

Regards,
Toivo

kevinh 07-20-2008 08:51 AM

Ho Toivo,

My emailintegration is 1884 line. Maybe it's something to do with my editor (EditPad).

I'l check it in another editor and see if it effect the line numbers .....

Can you please confirm what the code is that I have to replace - is it;

$plaintext_parser->set_parsing_language($touser['languageid']);

Thanks,
Kevin

kevinh 07-20-2008 08:54 AM

Hi Toivo,

I just checked it in Dreamweaver and the line nos are now correct!

Thanks for your help.

Regards,
Kevin

toivo 07-20-2008 09:31 AM

Hi Kevin,

That is the line.

Cheers,
Toivo

Alfa1 07-20-2008 01:10 PM

Quote:

Originally Posted by Cyricx (Post 1563550)
Mostly what I need from beta testers is to come to my test site and try to break it :)

Break it on my site, and I can find the bugs easier then I can try to find how they happened on someone else's server :)

What is the url of your test site? I'll be happy to help you test it. Maybe post the url in the main post of this thread as well.

riahiarshia 07-22-2008 01:10 AM

Quote:

Originally Posted by kevinh (Post 1578757)
In the mean time I am trying to disable posts by email while retaining the notifications.

I have modified the phrases for the new thread and new post emails so that they no longer contain the 'reply between the lines section' and make no reference to replying or starting threads by email. It's a bit of a bodge but it will work. However, in the notification emails I am getting far too much space above and below the previous message section.

I'm assuming this must be down to a php file - can someone please tell me which file it is that creates these email message?

Kevin,
The forum has an option to send emails to subscribed users. You do not need EI for that.
-Alex

kevinh 07-22-2008 06:17 AM

Quote:

Originally Posted by riahiarshia (Post 1581046)
Kevin,
The forum has an option to send emails to subscribed users. You do not need EI for that.
-Alex

Yes, but I want to subscribe people to certain forums by default when they subscribe.

It's academic now anyway because I'm pressing a head with EI after seeing reply #843

kevinh 07-22-2008 06:43 AM

Would someone please explain how I make this mod to a forum running 3.7.1 (what file to I edit? - I can't find anything called "newthread_post_complete"

Thanks,
Kevin

Quote:

Originally Posted by Ron Wilhelm (Post 1455616)
Thanks for a great plugin. This really elevates vBulletin's usability. I had one problem though - new threads didn't show the posters name in the initial email on "CURRENT MESSAGE FROM:" line for new style emails. I played around with this and fixed it by changing
Code:

$poster = $bbuserinfo['username'];
to

Code:

$poster = $vbulletin->userinfo[username];
in the newthread_post_complete plugin.

EDIT: I know my profile shows 3.6.7, but this was also on my 3.6.8 PL2 dev board.


kevinh 07-22-2008 08:04 AM

Another question for the EI experts :)

How long should it take for a reply by email to be posted on the forum?

I just had one take half an hour to come through so it ended up out of sequence with another post on the forum. In fact it was as if the forum post triggered the retrieval of the email reply.

toivo 07-22-2008 11:01 AM

Hi Kevin,

That is exactly how the 'cron' jobs work, they rely on the forum being accessed. I scheduled a small PHP script on an another box to access the home page every so often to guarantee a reasonable response time to emails.

Regards,
toivo

kevinh 07-22-2008 12:51 PM

Hi Toivo,

Would you mind explaining how I can do this because most of my users will be migrating from a mail list and I fear that many of them will use email integration and not access the forum very often, at least initially.

Regards,
Kevin

toivo 07-22-2008 01:34 PM

Hi Kevin,

Here is the code, working under vB 3.6.8. Replace the variables $forum_url and $cron_url.

The script reads the home page, extracts the cron.php with the parameters from the result and then sends a request for cron.php which runs the scheduled task(s).

Check the results from the vB back end to adjust the interval in your crontab or Windows scheduler, depending on which other cron jobs your site has.

Code:

<?php
/**
 * @forum_read.php
 * @20080723 toivo@totaldata.biz
 * reads the forum home page and triggers cron jobs to run
 * tested on vBulletin 3.6.8.
 * requires php >= 4.3.0
 */

$forum_url = 'http://example.com/testvb/index.php';
// cron url from <img src=
$cron_url = 'http://example.com/testvb/cron.php?';

// access forum
$run_status = forum_read($forum_url, $cron_url);
return;

function forum_read($forum_url, $cron_url) {
//  read file contents
  $page = file_get_contents($forum_url);
  if ($page === false) {
            $msg = "forum_read.php unable to read ".$forum_url;
            error_log($msg);
            return false;
  }
// find cron.php
  $cron_start_pos = strpos($page, $cron_url);

  $msg = '';
  if ($cron_start_pos === false) {
            $msg = "forum_read.php unable to find cron string";
            error_log($msg);
            return false;
  }

// end of url
  $cron_end_pos = strpos($page, '"', $cron_start_pos);
  if ($cron_end_pos === false) {
            $msg = "forum_read.php unable to find end of cron string";
            error_log($msg);
            return false;
  }
// extract full url string with cron.php
  $cron_url_length = $cron_end_pos - $cron_start_pos;
  $cron_full_url = substr($page, $cron_start_pos, $cron_url_length );
 //  read cron.php with parameters
  $page = file_get_contents($cron_full_url);
  if ($page === false) {
      $msg = 'forum_read.php '.$cron_full_url." : - PROBLEM?";
            error_log($msg);
            return false;
  }
  return true;
}
?>

If you are going to run it from Unix/Linux, a shell script similar to the following can be scheduled to run from a crontab entry:

Code:

#!/bin/bash
# load forum home page and read cron.php
php /root/forum_read/forum_read.php
exit 0


In Windows, you can run the script from a command file through the Windows scheduler.

Regards,
toivo

riahiarshia 07-22-2008 01:55 PM

AHHHH. This all makes sense now. I have been scratching my head to find out why EI is inactive at night. I was starting to think the little men who run around and fetch emails are sleeping. LOL

riahiarshia 07-22-2008 02:07 PM

I put in the workaround in #843. I have not had any issues so far.

-Alex

riahiarshia 07-22-2008 05:50 PM

Where is the info to add users to certain forums be default. I realize this is not the correct place to talk about this. I would appreciate if you just point me to the right direction.

-Alex

toivo 07-22-2008 08:15 PM

You can give a group like Registered users the access rights to the forums, and the users will then have the default access.

kevinh 07-23-2008 01:11 PM

Quote:

Originally Posted by riahiarshia (Post 1581601)
Where is the info to add users to certain forums be default. I realize this is not the correct place to talk about this. I would appreciate if you just point me to the right direction.

-Alex

I think you might mean this;

in admicp

vBulletin Options > vBulletin Options > Email Intergration - check out the very last option
"User's can choose to not auto subscribe?" set it to "No" and all new users will be subscribed to forums which are enabled for that usergroup.

In the management for each forum under Forum Manager in AdminCP, you need to enter the ID of each [S]forum[/S] usergroup which can use EI.

Kevin

kevinh 07-26-2008 12:51 AM

Toivo,
Many thanks for that php code to run access the forums via a cron job, I have it installed and it seems to work well.

It's a bit like the final piece in the EI puzzle :)

Regards,
Kevin

kevinh 07-26-2008 01:02 AM

[S]Actually, there is still one piece missing for me. [/S]

I worked it out :o

kevinh 07-28-2008 05:22 AM

Does anyone know why we might be getting some messages repeated with html code in them like this (see below). When I say repeated, the message came through twice - once formatted correctly and once with html at the beginning and end. Only the clean vserion ended up on the forum. This is the beginning of the email wihc went out to subscribers to the forum;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
<!--
body {
font-family: Verdana, Geneva, Arial, helvetica, sans-serif;
}
table {
margin-top: 1em;
}
td {
font-family: Verdana, Geneva, Arial, helvetica, sans-serif;
font-size: 80%;
}
th {
font-family: Verdana, Geneva, Arial, helvetica, sans-serif;
font-size: 80%;
}
alt2 {
background-color: #FFFFFF;
font-family: Verdana, Geneva, Arial, helvetica, sans-serif;
font-size: 80%;
}
-->
</style>
</head>
<body><div id="ei_reply">
Please type your reply below this line.<br>
<strong>NB:</strong> Your reply will be automatically be posted on the web forum!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-






-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
(Please type your reply above this line)

You may increase the space between the above lines as needed.


</div>
<div id="ei_body">
______________________
CURRENT MESSAGE FROM: geo

Vitessebooks (of Aachen, NRW, Germany) have this
at US$ 234.06, and this seems to be the
English-language edition from Copress Sport,
M?nchen (1996) -despite the German description.
To quote "Englischer Text. Nat?rlich 328 Seiten
!" It has the same number of pages as on the
Bentley link, incidentally, it weighs a hefty
1.8kg! Curiously, Copress Sport Verlag only has
Simons' early BMW book (up to 1932) on its own
site.


George

kevinh 08-02-2008 02:57 AM

Suggestion::

Almost all the users on my site are accustomed to basic mail lists where the From address is that of the poster (with the return address that of the mail list).

I know the reasons why we wouldn't want to do this with vBulletin and EI, but it could be useful to have the from address as "poster username" <forum email address>

This would make it much easier to identify posts from a specific sender.

kevinh 08-12-2008 02:51 AM

We are now running this on a live forum and I thought it might be worth sharing some of the issues we have come across;
  1. We had a small number of posts by email that displayed the html code in the email - we seem to have solved this by switching to plain text in the settings.
  2. Users clicked 'reply' after receiving an email notification of a new post, then cleared the whole email composition window and typed their reply, resulting in a new thread being created by EI.
  3. Users accidentally editing the dashed lines resulting in the whole reply email being puiblished in the forum, rather than what was just between the dashed lines - I'm surprised this wasn't treated as a new thread by EI.
  4. One user couldn't figure out why he couldn't type his reply between the dashed lines before he clicked 'reply', (he thought it was because he was using a Mac!).
  5. Users have also experienced some formatting/line break issues, possibly because their email text has been pasted from another application.
  6. We have noticed that some users tend to reply to any email with a completely unrelated post which belongs in another forum. In this instance we move the post, however if another user respond to the original post by email, their reply ends up in the original forum, rather than the forum the post was moved to.

Although all but one of these are user related problems, they should be considered carefully before using EI on a large, busy vBulletin site, because it could easily create a heavy admin load for the site owner.

riahiarshia 08-19-2008 07:34 PM

Is there a way to install root certificates for EI? Our IT just implemented this and we can no longer retrieve messages from the exchange server.

-Alex

Cyricx 08-19-2008 07:43 PM

Quote:

Originally Posted by riahiarshia (Post 1602555)
Is there a way to install root certificates for EI? Our IT just implemented this and we can no longer retrieve messages from the exchange server.

-Alex

Try using one of the connection options of with officially signed certificates or unofficial.

That should change the connection to the correct port.

brettb 08-20-2008 08:37 PM

We have a fairly small forum implementation with less than 100 users. Our forums are all invite only and access is controlled individually through access masks. We've been using this mod since the start of the forum but have recently been experiencing a few problems.

1) Some users are creeping into the notification list who weren't specifically assigned to the forum. This problem is controllable by looking at the data and weeding them out, but it's still curious how that happens.

2) For the past few weeks we had a situation where people who were note in the notification list received forum emails. I've traced the code and manually run all the queries and I can't find any reason at all this would have been happening. Naturally it doesn't happen consistently, but it has happened more than once. Any theories on what's going on there?

AyeCapn 08-26-2008 12:07 PM

I suspect this has been brought up before, but couldn't find anything. When a thread is ut into moderation it still generates an email before the moderation is approved or denied. Can the email be delayed until moderation approval is given?

riahiarshia 08-26-2008 12:52 PM

Quote:

Originally Posted by Cyricx (Post 1602560)
Try using one of the connection options of with officially signed certificates or unofficial.

That should change the connection to the correct port.

No go!. I had to forward all of the emails to a Gmail account in order to get this to work.

Thanks Anyway !!

Bluefin221 08-26-2008 07:03 PM

Users on my site can't access the instant notification, admin can just drop the box down and choose to have instant e-mails, it works for them quite clearly as I have also been dropping in e-mails to the site, however users can't even change the settings???

txspaderz 09-04-2008 02:15 AM

Cyrix,

Long time! Question, I've been using this for quite a while now. I need the option to turn off the Invalid User Emali error. I have one forum set for unregistered users to post in, however the email -> user check you have setup is blocking this from happening...

Any chance of getting this to work?

whardwick 09-09-2008 12:52 PM

My IT administrator informs me that we only have SMTP authentication for sending and receiving. I tried all authentication methods provided with this mod and none of them seem to work.

Is there a work-around that I can use?

Thanks.

rodneytamblyn 09-15-2008 03:11 AM

Hi Cyricx,

I see in 2.6 there's a new feature to allow users to opt-out of being auto-subscribed. I have enabled this option in the admin CP, but I cannot for the life of me find where this option should appear in the User CP :)

Can you tell me where it should appear, and secondly, let me know if there is any other place in the admin system (other than Email Integration Settings) where I may have to enable this feature.

Thanks

~ Rodney

toivo 09-16-2008 01:36 AM

Hi,

If your user community prefers the old email layout but you do not like to see the complete thread in the email, this code limits the included messages to two.

The modification assumes that the following options have been selected:

AdminCP - vBulletin Options - Email Integration Settings:
  • Use Single From Address
  • Do you want to use the old layout for emails

You have to fill in these options:
  • Single From Name
  • Single From Address

How to modify:

Insert the modification after line 264 in includes/cron/emailintegration.php:
Code:

$mailmessage = preg_replace($pattern, $replace, $mailmessage);
Modification:

Code:

// 20080916 toivo@totaldata.biz: remove all but last message, leave one delimiter
// ei options set: 'use old email layout',  'use single from: address', 'single from name', 'single from address'
$from_str = 'From: ' . $vbulletin->options['ei_single_from_name'] . ' ';
$from_str .= '[mailto:' .$vbulletin->options['ei_single_from_address'] .']';
// remove text inserted by Outlook, possibly other clients
$original_str = '-----Original Message-----';
$underscore_str = '________________________________';
$first_pos = strpos($mailmessage, $from_str);
if ($first_pos !== false) {
        $second_pos = strpos($mailmessage, $from_str, $first_pos + 1);
        if ($second_pos !== false) {
                $mailmessage = substr($mailmessage, 0, $second_pos);
                // remove  last '----- Original Message -----'
                $first_orig_pos = strpos($mailmessage, $original_str);
                if ($first_orig_pos !== false) {
                        $last_orig_pos = strrpos($mailmessage, $original_str);
                        if ($last_orig_pos !== false AND $last_orig_pos !== $first_orig_pos) {
                                $mailmessage = substr_replace($mailmessage, '', $last_orig_pos, strlen($original_str));
                        }
                } else {
                        $first_us_pos = strpos($mailmessage, $underscore_str);
                        if ($first_us_pos !== false) {
                            $last_us_pos = strrpos($mailmessage, $underscore_str);
                            if ($last_us_pos !== false AND $last_us_pos !== $first_us_pos) {
                                $mailmessage = substr_replace($mailmessage, '', $last_us_pos, strlen($underscore_str));
                            }
                    }
              }
        }
}
// 20080916 end

Regards,
toivo

TBrewerton 09-16-2008 11:30 AM

Hi,

Is there an option for a daily digest of the messages rather than all messages, like on yahoo groups??

If not is there a mod for this??

Kindest Regards,

Tim

rconn 09-23-2008 10:42 AM

I had everything working for several months, then upgraded to vBulletin 3.7.3. Now the posts sent via email aren't appearing in the forum. (They are in the account inboxes, but they're apparently not being picked up.)

I doublechecked everything I could find but don't see any reason why the messages aren't being forwarded. Anybody have an idea what's going on?

Thanks.

Rex Conn


All times are GMT. The time now is 05:02 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.02444 seconds
  • Memory Usage 1,865KB
  • 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
  • (6)bbcode_code_printable
  • (9)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