Module: External Phorummail
Posted by Thomas Seifert
All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
ext_phorummail-2.1.5.tar.gz | 159.7 KB | open | download | Thomas Seifert | 03/28/2011 | Read message |
ext_phorummail-2.1.5.zip | 258.5 KB | open | download | Thomas Seifert | 03/28/2011 | Read message |
charset.jpg | 34.4 KB | open | download | Robert Angle | 09/05/2009 | Read message |
ext_phorummail.php.patch.gz | 390 bytes | open | download | chriss | 11/30/2009 | Read message |
settings.php.patch.gz | 227 bytes | open | download | chriss | 11/30/2009 | Read message |
phorummail-script.jpg | 51.2 KB | open | download | Robert Angle | 05/29/2010 | Read message |
phorummail-bug1.jpg | 25.4 KB | open | download | Robert Angle | 07/07/2010 | Read message |
phorummail-bug2.jpg | 122 KB | open | download | Robert Angle | 07/07/2010 | Read message |
Phorum_Admin_modules.jpg | 189.7 KB | open | download | snowcrash101 | 08/09/2012 | Read message |
ext_phorummail-2-2-0.tar.gz | 228.4 KB | open | download | wcpreston | 01/24/2017 | Read message |
Module: External Phorummail August 31, 2009 12:28PM |
Admin Registered: 20 years ago Posts: 9,240 |
This module allows importing emails from external mail accounts through POP3, IMAP with SSL (requires the OpenSSL php extension to be installed).
Together with the Mailing List Module this allows for two way integration with mailinglists.
Version 2.x because its mostly a rewrite the of the old POP3Phorummail module with another mail parser- and connection library (EZ Components, included in the module, no PEAR libs are needed), additional support for IMAP and mail attachments. Additionally it fixes an issue when multiple phorums are bound to one maillist and the phorums would miss each others messages.
Example install ServerPhorums.com.
Thomas Seifert
Edited 12 time(s). Last edit at 03/28/2011 03:21PM by Thomas Seifert.
Together with the Mailing List Module this allows for two way integration with mailinglists.
Version 2.x because its mostly a rewrite the of the old POP3Phorummail module with another mail parser- and connection library (EZ Components, included in the module, no PEAR libs are needed), additional support for IMAP and mail attachments. Additionally it fixes an issue when multiple phorums are bound to one maillist and the phorums would miss each others messages.
Quote
README
Requirements:
-------------
- PHP5 install with at least mysql/mysqli, iconv, SPL - which are usually bundled with PHP by default
- Phorum-5.2.x install (tested only on 5.2.13)
- shell / cronjob access to setup a scheduled task to run this module,
raw shell access is only needed during testing
Quote
README
Installation instructions:
--------------------------
- Unpack the archive;
- Move the directory "ext_phorummail" to the directory "mods"
within your Phorum installation;
- Login as administrator in Phorum's administrative interface and
go to the "Modules" section;
- Enable the module "External Phorummail".
- Go to the settings page of the External Phorummail module to configure from which
mailservers and to which phorums it should import mail.
- Setup a cronjob to run scheduled tasks
for example like this (would run the tasks every 5 minutes):
*/5 * * * * cd /home/your/phorum/directory && /usr/bin/php ./script.php --scheduled > /dev/null
I recommend to run the script by hand until everything is working correctly, e.g with this command-line
cd /home/your/phorum/directory && /usr/bin/php ./script.php --scheduled
Example install ServerPhorums.com.
2011-03-22 v2.1.5 Robert Angle - add an option to moderate all incoming messages by marking them as unapproved messages. 2010-10-10 v2.1.4 - fix for missing / at the end of tmpDir in some environments - some refactoring to avoid duplicated code 2010-09-17 v2.1.3 - fixed ssl option (again), made password field a real password field - set tmp path for the parser to phorum cache directory (to avoid always using /tmp) - fixed access check for moderated forums 2010-07-11 v2.1.2 - fixed importing relatedPart-Mails (e.g. from Incredimail) - fixed empty attachment names which seem to occure in similar cases - upgraded ezComponents to 2009.2.1 which seems to be the last release before the rename to Zeta Components 2010-06-03 v2.1.1 - Robert Angle - now prevents registered but inactive members from posting via email. 2010-06-01 v2.1.0 - Robert Angle - added an option to deny emails from non-registered users. - added an option to enable the after_post hook. 2009-09-04 v2.0.6 - bugfix for lost message subject (bug introduced in 2.0.5) 2009-09-04 v2.0.5 - added search for html parts in case no text/plain part is found - fixed handling of "related Multipart" messages in case there is no body found (thanks to Jim Ohlstein for the report) 2009-09-04 v2.0.4 - fixed handling of "related Multipart" messages 2009-09-04 v2.0.3 - added automatic charset conversion in case a different charset is set in the default 2009-09-03 v2.0.2 - added an option to specify the maximum message size to import 2009-09-01 v2.0.1 - fixed a bug in the error case so that an error message is really sent out. 2009-08-31 v2.0.0 - Initial release of the rewritten version based on EZ Components and with additional IMAP Support. renamed to External Phorummail as its not only POP3-based anymore. 2008-10-12 v1.0.0 - Initial release of the original POP3Phorummail
Thomas Seifert
Edited 12 time(s). Last edit at 03/28/2011 03:21PM by Thomas Seifert.
September 01, 2009 10:31PM |
Registered: 15 years ago Posts: 533 |
September 02, 2009 12:51AM |
Admin Registered: 18 years ago Posts: 8,532 |
Correct, unless your Phorum is converted to UTF-8. Note however that this comes with some problems and is not a really easy task to perform.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



Re: Module: External Phorummail September 02, 2009 07:11AM |
Admin Registered: 20 years ago Posts: 9,240 |
Re: Module: External Phorummail September 04, 2009 05:41AM |
Admin Registered: 20 years ago Posts: 9,240 |
Re: Module: External Phorummail September 04, 2009 07:31AM |
Admin Registered: 20 years ago Posts: 9,240 |
September 04, 2009 11:16AM |
Registered: 14 years ago Posts: 38 |
Quote
Thomas Seifert
And another update to 2.0.4 for handling multipart related messages.
Hi Thomas,
I am getting errors with multipart messages:
These options need to match in Unknown on line 0 PHP Notice: Undefined index: name in /path/to//mods/ext_phorummail/ext_phorummail.php on line 170 PHP Fatal error: Call to undefined method ezcMailMultipartRelated::getParts() in /path/to/mods/ext_phorummail/ext_phorummail.php on line 258
I'm not worried about the notice but the fatal error is obviously the issue. I noticed it when there were two multipart messages in the inbox. For the moment I have commented out lines 256-268:
Language: PHP
// if we found no text/plain part, use the first part // This should be rare, but you can never tell. $msgparts = $message->body->getParts(); $new_message["body"]=$firstpart->text; // give it shot to see if it is HTML if($firstpart->subType=="html"){ } }
The problem is that now those two multipart messages came out blank.
PHP is 5.2.10 (CLI).
Jim
Nginx Forum
Re: Module: External Phorummail September 04, 2009 11:42AM |
Admin Registered: 20 years ago Posts: 9,240 |
Good to know that there's someone else using that code too :).
Well, that part is a last resort for messages having no text/plain part after all. So they might have ended up empty anyway.
I added a search for html bodies if no text/plain bodies were found and fixed this call.
Try the fresh 2.0.5 release.
Thanks for the report.
Thomas Seifert
Well, that part is a last resort for messages having no text/plain part after all. So they might have ended up empty anyway.
I added a search for html bodies if no text/plain bodies were found and fixed this call.
Try the fresh 2.0.5 release.
Thanks for the report.
Thomas Seifert
Re: Module: External Phorummail September 04, 2009 12:13PM |
Admin Registered: 20 years ago Posts: 9,240 |
September 04, 2009 12:44PM |
Registered: 14 years ago Posts: 38 |
I was using the previous mod that you gave me a great of help getting to work properly.
Some advantages of this new mod include recognizing non-English characters when the email is encoded using "ISO-8859-1" and some other non "utf-8" charsets, which was giving us some troubles. It also recognizes Chinese characters in "Sender" field which had been in an issue. They were coming out as blank. We have a good number of users from China as nginx is very popular there. Unfortunately, many of those users seem to send HTML only mail so I hope this works.
I'll do some tests with those emails and let you know.
Jim
Nginx Forum
Some advantages of this new mod include recognizing non-English characters when the email is encoded using "ISO-8859-1" and some other non "utf-8" charsets, which was giving us some troubles. It also recognizes Chinese characters in "Sender" field which had been in an issue. They were coming out as blank. We have a good number of users from China as nginx is very popular there. Unfortunately, many of those users seem to send HTML only mail so I hope this works.
I'll do some tests with those emails and let you know.
Jim
Nginx Forum
Sorry, only registered users may post in this forum.