[ABD] Mail Gateway

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
omarf
Registered User
Posts: 18
Joined: Sat Sep 23, 2006 3:04 am

Re: [ALPHA] Mail Gateway

Post by omarf » Mon Oct 29, 2012 4:07 pm

Eric - thanks for developing this MOD.

Ever since the demise of the mail2forum project, I've been searching for an alternative with the same functionality, and your Mail Gateway is a great start in the right direction. Could you be persuaded to develop it further to incorporate the functions mail2forum had for phpBB2?

Some desired features:
Starting topics
Threading messages into topics
Updating user tables with post information
Handling of email attachments
Only registered users can post
Stripping portions of incoming mail text (vBulletin older versions had an email integration mod with this - "type your reply above this line..." and everything below is discarded)

mail2forum was a great MOD and it's a shame its development for phpBB3 was abandoned. IPB (Invision Power Services) have indicated they are looking into adding email functionality for their version 4.x which is in development. That is commercial software and there is demand for email integration. They just released functionality that can integrate Mailchimp's Mandrill service for bulk email.

As you are aware and you already posted in your blog, allowing email interaction with a forum is great for building participation - it lets those comfortable with mail lists stay plugged in while those who prefer online forums never have to use it and see no difference in their forum interaction. Sometimes the messages get messy, yes - but I think that can be fixed by stripping 'everything below the line" like I mentioned above.

Anyway, if you are so inclined, you could likely make this into a paid MOD with significant market appeal.

Diego898
Registered User
Posts: 113
Joined: Mon Oct 18, 2004 9:31 pm

Re: [ALPHA] Mail Gateway

Post by Diego898 » Tue Jan 29, 2013 4:46 am

just wondering as to the status of this mod?

thanks for the great work!

Elric Pedder
Registered User
Posts: 12
Joined: Thu Jul 12, 2007 4:35 pm
Contact:

Re: [ALPHA] Mail Gateway

Post by Elric Pedder » Tue Jan 29, 2013 3:07 pm

omarf wrote:Eric - thanks for developing this MOD.
I realised I never got around to saying thanks for your support. You made a lot of good points and they haven't gone unnoticed. Time permitting, I will work on the improvements you've mentioned.

Elric Pedder
Registered User
Posts: 12
Joined: Thu Jul 12, 2007 4:35 pm
Contact:

Re: [ALPHA] Mail Gateway

Post by Elric Pedder » Tue Jan 29, 2013 3:08 pm

Diego898 wrote:just wondering as to the status of this mod?
It is functioning reasonably well for my forum and I believe others are using it too. I haven't had time to do updates in awhile and it should have the status changed as it is being used.

omarf
Registered User
Posts: 18
Joined: Sat Sep 23, 2006 3:04 am

Re: [ALPHA] Mail Gateway

Post by omarf » Tue Jan 29, 2013 3:14 pm

Elric Pedder wrote:Time permitting, I will work on the improvements you've mentioned.
That's really good news, Eric. I'll gladly pitch in with testing, too.

kazkotx
Registered User
Posts: 21
Joined: Mon Sep 22, 2008 3:23 pm

Re: [ALPHA] Mail Gateway

Post by kazkotx » Tue Feb 19, 2013 9:51 pm

I am successfully using this to connect a niche forum to a couple of groups. Because I was interested in importing the large archive I already had from using yahoo2mbox, and I didnt want to maintain multiple emails, one for each group, I chose to use the drop-folder capability and a scraper for updates.

Elric, I have found that the drop-folder is failing on all sorts of messages from Yahoo. Multi-part, html, and other hiccups kills the import. As a non-developer, I have had to use perl and regex to clean up the files before import. I have been very successful doing this with just a few bugs still. What I really need to do is use a couple of classes to remove all html and then also cleanse email headers because Yahoo no longer lets you scrape good formatted info. Just view a few groups messages and check the Message Source in the Options dropdown. It's messy.

My setup is as follows:
1. yahoo2mbox.pl - Originally used to collect and maintain archives on schedule
2. grabyahoogroup.pl - Newer script that can save individual messages instead of mbox
3. mbox2maildir.pl - converter to allow use of old mbox archive
4. cleansing script - I wrote this to clean up the mess that is in the files
5. Elric's mail gateway - In drop folder mode. Configured to not try to connect local and remote users.

Once you have all the bugs ironed out on your test system, you can start from scratch and slowly import your archive from message #1. I suggest importing 100 at a time, in order. Once that is done, you can link it up to scheduled updates and let it roll automatically.

I'd like to see this work better with the drop-folder. Perhaps someone with real coding skills could help work up a real script for cleansing out the garbage from yahoo scrapes which includes some super ridiculous quoting, and all sorts of oddball characters that need removing which sucks with regex.

Maybe Elric can devise a way to directly import an old mbox or maildir archive so that everything is in place when you throw the switch for auto-update. Of course these old archives are messy as stated above, so the same issues will apply.

Another tweak I'd like to see is that the script will use the date from the header. This is only really important when importing an old archive, so for me, that functionality is best served in the drop-folder configuration.

User avatar
balboag
Registered User
Posts: 76
Joined: Wed Jul 13, 2011 3:52 pm
Location: Galicia, Spain
Name: Gerardo

Re: [ALPHA] Mail Gateway

Post by balboag » Wed Feb 20, 2013 6:15 pm

I didn't understand the part of setting up a cron job.
You will need to set up a cron job or scheduled task that executes "cron_mailgateway.php" regularly. Each time this file is executed new posts will be sent and new messages collected. Ideally it should be called every five minutes.
I can run this mod in a shared hosting?

Ok, I think i can use this https://www.setcronjob.com/

kazkotx
Registered User
Posts: 21
Joined: Mon Sep 22, 2008 3:23 pm

Re: [ALPHA] Mail Gateway

Post by kazkotx » Mon Feb 25, 2013 8:51 pm

...Another tweak I'd like to see is that the script will use the date from the header.
I spent more time on this issue and came to realize that grabbing and converting the date to unix time stamp is already in place. An hour of effort to troubleshoot revealed that there was in fact no problem with Elric's script at all. The problem exists in phpbb 3.0.11. It is ignoring the time stamp passed by Elric's script and would also be ignoring time data passed by any mod using the post function.

In BB3 includes/functions_posting.php, within the function submit_post down around 1650 there is a static assignment:

Code: Select all

$current_time = time();
You can wrap it with an if statement:

Code: Select all

	if ($data['post_time'] != null) {
		$current_time = $data['post_time'];
	} else	{
		$current_time = time();
	}
Now it will keep existing date info from imported messages.

dimmon
Registered User
Posts: 11
Joined: Fri May 24, 2013 10:18 am

Re: [ALPHA] Mail Gateway

Post by dimmon » Mon May 27, 2013 2:20 pm

If there are russian speaking users on this threed, the advice would be useful to them...
If after posting a message by mail you can see forum subject in bad charset like this:
просто очередной тест 11
add to ./cron_mailgateway.php this line:

Code: Select all

$subject = iconv('UTF-8', 'ISO-8859-1', $subject);
after that:

Code: Select all

$subject = $data['subject'];

dimmon
Registered User
Posts: 11
Joined: Fri May 24, 2013 10:18 am

Re: [ALPHA] Mail Gateway

Post by dimmon » Mon May 27, 2013 2:59 pm

Please help me! How can I post reply in topics created earlier by mail?
I found keyword "In-Reply-To" in cron_mailgateway.php code but I can't understand where I must to write it. "In-Reply-To" in the email subject or in the email body posts as a normal text...

Elric Pedder
Registered User
Posts: 12
Joined: Thu Jul 12, 2007 4:35 pm
Contact:

Re: [ALPHA] Mail Gateway

Post by Elric Pedder » Mon May 27, 2013 3:13 pm

When you reply to a message in your mail client the client should create the In-Reply-To header containing the message-id of the original message.

dimmon
Registered User
Posts: 11
Joined: Fri May 24, 2013 10:18 am

Re: [ALPHA] Mail Gateway

Post by dimmon » Tue May 28, 2013 2:24 pm

Elric, thanks for reply!
Excuse me, what kind of message-id: notification email or original mail-to-forum posted email?
If last, where I can find message-id of mail-to-forum posted email?

I really need to implement the mail-to-forum posts of new topics and mail-to-forum reply posts by responding to the notification email. Reply by message-id - Is this what I need?

I think it would be better to insert topic-id in notification email. And when I reply to message php script parsing message by topic-id and post reply, but I didn't have enough experience to realize it! :oops:

Elric Pedder
Registered User
Posts: 12
Joined: Thu Jul 12, 2007 4:35 pm
Contact:

Re: [ALPHA] Mail Gateway

Post by Elric Pedder » Wed May 29, 2013 2:45 pm

dimmon, I'm not sure I'm following you. Mail clients always set the In-Reply-To header when replying to e-mails. What mail client are you experimenting with?

dimmon
Registered User
Posts: 11
Joined: Fri May 24, 2013 10:18 am

Re: [ALPHA] Mail Gateway

Post by dimmon » Thu May 30, 2013 1:58 pm

Elric, my mail client is Thunderbird 17.0.5.
The procedure is as follows:
1) user1 create new topic TOPIC1 by sending mail to post@test.forum.
2) user2 receive new topic notification, create reply, change recipient to post@test.forum and send it.
There is In-Reply-To: <22e4e06e34d5546f1117d6e4a6dd2e73@test.forum> header in message body.
3) As a result there are two different topics in the forum: TOPIC1 and Re:New Topic Notification.

The same procedure is then 1) user1 reply to topic TOPIC1 by reply button in forum web page..

What am I doing wrong?

Elric Pedder
Registered User
Posts: 12
Joined: Thu Jul 12, 2007 4:35 pm
Contact:

Re: [ALPHA] Mail Gateway

Post by Elric Pedder » Mon Jun 03, 2013 2:18 am

dimmon wrote:2) user2 receive new topic notification, create reply, change recipient to post@test.forum and send it.
The new topic notification e-mail is not the same as mail sent out by this mod and it doesn't have the correct message-id in it. Can user2 receive mail distributed by this mod instead? Replying to those messages should result in them going to the correct topic.

Locked

Return to “[3.0.x] Abandoned MODs”