Tags:
email2Add my vote for this tag import1Add my vote for this tag create new tag
, view all tags

MailInContribDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on MailInContrib contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please file bug reports in the MailInContrib bug database.

Feedback on MailInContrib

-- CrawfordCurrie - 10 March 2005

So much happening in the Plugins web, almost missed this Contrib! Thanks for sharing this with the TWikiCommunity!

-- PeterThoeny - 19 Mar 2005

Note there are three known solutions to this problem, which is partly why this contrib is present for DEVELOP only.

See also MailInAddOn and MailToTWikiAddOn; either of these solutions may suit you better, and I think should work on Cairo release.

-- CrawfordCurrie - 19 Mar 2005

Crawford, I made some enhancements to the NewContribTemplate and created supporting Contrib topics. With this I changed the Contrib topic text:

  • Added TOC
  • Added SHORTDESCRIPTION in "Settings" section
  • Added a note to the "Installation Instructions" section
  • Added link to GPL in "License" table row
  • Added "Appraisal" table row
  • Fixed heading levels (use level one only once on top)

Could you take that into the next release of the package?

-- PeterThoeny - 22 Mar 2005

There is a new release available for download. it supports attachments, and is Cairo compatible.

-- CrawfordCurrie - 01 Aug 2005

Hi, just a note: the documentation does not mention what happens in the event that the subject line is mal-formatted.

-- MartinCleaver - 29 Oct 2005

From the installer (dreamhost/debian sarge):

 * Name of the topic where you want to save mails that don't have
 * a valid web.topic on the Subject: line. If you don't specify this,
 * these mails will simply be ignored.
 * You must specify a full web.topic name (recommend LEAVE BLANK)
Full name of spambox topic:
Full name of spambox topic:
Full name of spambox topic:

-- MartinCleaver - 06 Nov 2005

i.e. leaving the spambox topic blank did not work for me.

-- MartinCleaver - 06 Nov 2005

The script does not handle spaces in filenames like the normal upload in the Wiki does. I get:

illegal characters in file name component Anfahrt WGW mit Umleitung.jpg of filename /home/twiki/pub/Sandbox/NeuerMailtestMitAnhang/Anfahrt WGW mit Umleitung.jpg at /home/twiki/lib/TWiki/Sandbox.pm line 140.

Can you provide an easy fix?

-- JensHassler - 19 Feb 2006

Crawford, some feedback on latest update:

  • The "Contrib Info" table has a formatting issue (new line missing)
  • Better to use full URL instead of Interwiki links for "Home" and "Feedback"
  • On what TWiki version is this tested? (TestedOnTWiki field in PackageForm)

-- PeterThoeny - 28 Feb 2006

Some suggestions:

  • Please make eMail check in FuncUsersContrib case-insensitive (because Mail addresses can be mixed case).
  • IMAP support doesn't work, can you check this? First, there is no IMAP/Delete.pm available in Perl. Second, Perl seems to be unable to parse the Mail headers correctly when reading from IMAP. Very strange.
  • Suggestion: Add the possibility to optionally extract the HTML content of the mail. I did a quick hack to recognise the word "html" in the subject line to return text/html instead of text/plain.

Thanks!

-- JensHassler - 08 Mar 2006

Jens, be very carful what you ask for!

E-mail addresses are case sensititve. It is DNS FQDNs that are case insensitive.

However some operating systems may choose to treat use 'name' part of the e-mail address in a case-insensitive manner.

See RFC822 and its later revisions. Commentaries and later interpretations point out that the original intent of a "mailbox" is very loose and things like telephone numbers, names of process and the like can also be used.

If your operating system treats JensHassler the same as jenshassler or jENShASSLER or JeNsHaSsLeR then that is an issue to be dealt with locally. My operating system treats these as distinct names.

Finally, while many of us consider HTML mail to be 'evil' and often poorly formatted, your quick hack soudns useful. Why not attach the diff so we can make use of it ourselves?

-- AntonAylward - 08 Mar 2006

Probably pure ignorance, but I can't get it to work. After running the installer, and going to /bin to call perl ../tools/mailincron I get this message:

Process Maildir folder pop://aclemens:XXXX@mail.visiblearea.com:110/
Scanning pop://aclemens:XXXX@mail.visiblearea.com:110/
pop://aclemens:XXXX@mail.visiblearea.com:110/ does not exist at /usr/lib/perl5/site_perl/5.8.0/Email/Folder.pm line 81
Anything obvious that I am missing? I have checked the email adress for zillion times and that seems to be correct. (password blanked here)

-- ArthurClemens - 27 Mar 2006

We would like to have emails show up on the Twiki as threaded discussions. There is a threaded discussion plug in to Twiki, ThreadedDiscussionPlugin. Has there been any thought given to enable this plug-in to generate pages that would be properly formatted for the threaded discussion plug-in?

-- RobertBlumen - 07 Apr 2006

Arthur:I expect either your password is wrong, or your mailbox folder spec isn't sufficient. Try adding "Inbox" to the end (or whatever folder you wanted).

Robert: No, but adding templates to do it shouldn't be too hard. though I'm not going to do it.

-- CrawfordCurrie - 10 Apr 2006

Use 'pop://aclemens:XXXX@mail.visiblearea.com:110'

-- VladimirBaranov - 04 May 2006

Problem:

[Mon May 15 20:16:55 2006] [error] [client 192.168.77.82] pop://xproduct_welcome-rt_com:XXXXX@mail.heb.pacwan.net:110/ does not exist at /usr/lib/perl5/site_perl/5.8/Email/Folder.pm line 81\n
[Mon May 15 20:16:55 2006] [error] [client 192.168.77.82]  at /twiki/lib/TWiki/Contrib/MailInContrib.pm line 47\n
Solution: Remove the trailing '/' from the pop URL

Problem:

[Mon May 15 22:16:04 2006] [error] [client 192.168.77.82] Can't locate Email/Folder/POP3.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8/cygwin /usr/local/lib /usr/local/bin /twiki/lib/CPAN/lib//arch/ /twiki/lib/CPAN/lib//5.8.7/cygwin-thread-multi-64int/ /twiki/lib/CPAN/lib//5.8.7/ /twiki/lib/CPAN/lib// /twiki/lib . /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 .) at (eval 120) line 3.\n
[Mon May 15 22:16:04 2006] [error] [client 192.168.77.82]  at /twiki/lib/TWiki/Contrib/MailInContrib.pm line 47\n
Solution: Install Email::Folder::POP3 from CPAN

Problem:

[Mon May 15 22:34:35 2006] [error] [client 192.168.77.82] Process POP3 folder pop://xproduct_welcome-rt_com:XXXX@mail.heb.pacwan.net:110\n
[Mon May 15 22:34:35 2006] [error] [client 192.168.77.82] Scanning pop://xproduct_welcome-rt_com:XXXXX@mail.heb.pacwan.net:110\n
[Mon May 15 22:34:35 2006] [error] [client 192.168.77.82] Message from "Ramkumar K.B." <kb.ramkumar@welcome-rt.com>: Main.XlsRoadMap: Test email\n
[Mon May 15 22:34:35 2006] [error] [client 192.168.77.82] Can't locate object method "findUser" via package "TWiki" at /twiki/lib/TWiki/Contrib/MailInContrib.pm line 178.\n
[Mon May 15 22:34:35 2006] [error] [client 192.168.77.82]  at /twiki/lib/TWiki/Contrib/MailInContrib.pm line 47\n
[Mon May 15 22:34:35 2006] [error] [client 192.168.77.82] \tTWiki::Contrib::MailInContrib::__ANON__('Can\\'t locate object method "findUser" via package "TWiki" at...') called at /twiki/lib/TWiki/Contrib/MailInContrib.pm line 178\n
[Mon May 15 22:34:35 2006] [error] [client 192.168.77.82] \tTWiki::Contrib::MailInContrib::processInbox('TWiki::Contrib::MailInContrib=HASH(0x10808db8)', 'HASH(0x10120b88)') called at f:\\twiki\\bin\\MAILIN~1 line 57\n
Solution: Changed line 172 to use from hardcoded TwikiAdmiinstrator in MailInContrib.pm. It appears that there is some error is parsing From when the mail comes from Outlook.
#$user = TWiki::Contrib::FuncUsersContrib::lookupUser( email => $from ); 
$user = TWiki::Contrib::FuncUsersContrib::lookupUser( wikiname => 'TwikiAdimistrator' );
Problem: Cannot delete emails from the mailbox. Solution: Still figuring out... Something to do with Email::Delete::POP3 but do not know what exactly

-- RamkumarKb - 15 May 2006

w.r.t the last point; I tried to use the "state of the art" mail modules from CPAN, but there are clearly still holes in the support, and especially the documentation. It helps a lot when people (like Rumkumar) add their experiences here; I will try to refactor them into documentation for future releases.

For now, I have done an Email::Delete::POP3 implementation, but it is not reliable. Any help from the user community is very welcome....

-- CrawfordCurrie - 15 May 2006

I see a lot of common ground between this and MailToTWikiAddOn. They are different FrontEnd interfaces for retreiving mail but it seems a unified (perhaps pluggable) BackEnd for processing mail into pages would allow these to grow in a number of interesting directions. In interest in factoring out a "OnIncomingMail" handler that could be called by either of these AddOns and allow Plugin development on the mail processing side?

-- JadeCravy - 17 Jun 2006

For e-mail conversations, it would be nice if the dependency on the e-mail subject is removed, e.g. use a twiki address to address the topic, such as twiki+Travels.DailyDiary@mum_and_dad.org.uk. That way, one could easily CC twiki, and if a client "replies all", it would end up in a locked down twiki topic.

-- PeterThoeny - 08 Sep 2006

And it would be really cool if part of ">" quoted text is removed; the part that is already in the topic (which happens with repeated replies.)

-- PeterThoeny - 10 Sep 2006

When I configure a mailbox using the MailInContrib_installer where are the configuration setting stored?

-- AlokNarula - 01 Nov 2006

I figured out that the mailbox configuration is stored in LocalSite.cfg. Here is my mailbox configuration for getting TWiki mails stored in my Microsoft Exchange mailbox inbox/twiki.

$TWiki::cfg{MailInContrib} = [
 {
   defaultWeb => 'Sandbox',
   folder => 'imap://anarula:XYZ@mail.beceem.com/inbox/twiki',
   onError => 'reply',
   onNoTopic => 'spam',
   onSuccess => 'reply',
   spambox => 'Sandbox.DummyTopic',
   topicPath => 'subject',
   user => 'anarula',
 },

When I run the mailincron tool, I get this error. Can anybody tell me what is the problem and how should I get mailincontrib working.

../tools/mailincron debug=0
Process IMAP folder imap://anarula:XYZ@mail.beceem.com/inbox/twiki
Scanning imap://anarula:XYZ@mail.beceem.com/inbox/twiki
[Thu Nov  2 14:30:16 2006] mailincron: Use of uninitialized value in split at /usr/lib/perl5/site_perl/5.8.8/Email/Folder/IMAP.pm line 27.
[Thu Nov  2 14:30:16 2006] mailincron: substr outside of string at /usr/lib/perl5/site_perl/5.8.8/Email/Folder/IMAP.pm line 31.
Can't call method "get" on an undefined value at /usr/lib/perl5/site_perl/5.8.8/Email/Folder/IMAP.pm line 40.

-- AlokNarula - 02 Nov 2006

My version of Email::Folder::IMAP (1.2) doesn't have a split on line 27, so I suspect module version problems. The error on line 31 of IMAP.pm suggests there may be an issue with URI as well.

-- CrawfordCurrie - 03 Nov 2006

I am getting the error when I run mailincron: Can't call method "stringify" on unblessed reference at /var/www/twiki/lib/TWiki/Contrib/MailInContrib.pm line 188. Line 188: print STDERR "User ",$user->stringify(),"\n" if( $user && $this->{debug} ); Has anyone seen this error or know what would generate it. Thanks.

-- MaryVerge - 17 Nov 2006

It depends what version of TWiki you are running.

-- CrawfordCurrie - 18 Nov 2006

I am running TWiki 4.0.4. thanks.

-- MaryVerge - 20 Nov 2006

I was getting the same error as MaryVerge. I tracked the problem down part way. It has something to do with $user being an array reference in the MailInContrib::processInbox method. Around line 187 I added this:

if ( $user->[0]->isa( 'TWiki::User' ) ) { $user = $user->[0]; }

That resolved the issue for me. A better solution would be to resolve the initial assignment of $user.

-- AaronJohnson - 19 Dec 2006

Nice one, Aaron, thanks. I think I tripped over an API change there :-(. I have raised Bugs:Item3334

-- CrawfordCurrie - 20 Dec 2006

When installing MailInContrib_instatter I get this error message -

RCS: /usr/bin/rcs -l %FILENAME|F% failed: at /srv/www/htdocs/twiki/lib/TWiki/Store/RcsWrap.pm line 419.

Please help

-- RyanLi - 03 Jan 2007

Im installing the new version of MailInContrib and now i get this error-

syntax error at MailInContrib_installer.pl line 424, next token ??? Can't use global @_ in "my" at MailInContrib_installer.pl line 425, near "= @_" syntax error at MailInContrib_installer.pl line 479, near "}" Execution of MailInContrib_installer.pl aborted due to compilation errors. Help?

-- RyanLi - 03 Jan 2007

See response in suport web

-- CrawfordCurrie - 04 Jan 2007

It might be stated somewhere but, can this plugin import HTML based emails also? Does it keep the formatting and links?

-- MiloValenzuela - 09 Feb 2007

Hi, I got Can't locate object method "findUser" via package "TWiki" at /twiki/lib/TWiki/Contrib/MailInContrib.pm line 178.\n

Changing ($user = $TWiki::Plugins::SESSION->findUser( $box->{user} ))) { to ($user = $TWiki::Plugins::SESSION->{users}->findUser( $box->{user} ))) {

fixed it for me.

-- DortheLuebbert - 22 Apr 2007

You must be trying to run it with the latest code in MAIN. Sorry, I'm not supporting that yet. Milo, yes. Please ask support questions in Support web.

-- CrawfordCurrie - 22 Apr 2007

I've put

$TWiki::cfg{MailInContrib} = [
 {
   folder => 'imap://twiki:XXXXX@brightcarvings.com/Inbox:143',
   onError => 'log',
   onNoTopic => 'error',
   onSuccess => 'delete',
   topicPath => 'subject',
   spambox => 'Admin.SpamBox',
   user => 'ChrisHogan',
    },
];
into my LocalSite.cfg & I run the mailincron script & get


chris cgi-bin # perl mailincron debug=1
Process IMAP folder imap://twiki:XXXXX@brightcarvings.com/Inbox:143
Scanning imap://twiki:theixeup@brightcarvings.com/Inbox:143
chris cgi-bin #
So, no error messages, but I don't seem to get log entries in warning or debug & I don't get any text imported into any topic

-- ChrisHogan - 26 Apr 2007

If I leave off 143 it doesn't work, I get a "folder doesn't exist", but If I take off the "/Inbox making "imap://twiki:XXXXX@brightcarvings.com:143" I get

Process IMAP folder imap://twiki:XXXXX@brightcarvings.com:143
Scanning imap://twiki:XXXXX@brightcarvings.com:143
substr outside of string at /usr/lib64/perl5/site_perl/5.8.8/Email/Folder/IMAP.pm line 34, <GEN0> line 2.
substr outside of string at /usr/lib64/perl5/site_perl/5.8.8/Email/Folder/IMAP.pm line 34, <GEN1> line 2.

-- ChrisHogan - 27 Apr 2007

I have lied you - if I finish the folder spec with a "/" that's when I get "folder not found" - the presence or absence of ":143" is irrelevant. If the folder spec is "...@brightcarvings.com" or "...@brightcarvings.com/Inbox" it's then "nothing" happens - or is it just not finding emails? The IMAP server is Courier if that's relevant.

-- ChrisHogan - 27 Apr 2007

So... the instructions say To run the script...

0 * * * * cd /home/twiki/bin && ./mailincron 2&>1 >> /home/twiki/logs/mailincron.log

You must run the script from the bin directory.

But mailincron is installed in tools.

Do I want to copy / link mailincron to bin? or run ../tools/mailincron from bin? or...?

-- VickiBrown - 30 May 2007

My email is already delivered to /var/mail on my local system (where the TWiki tree is kept) in mbox format. Can anyone help me understand how to set up the folder variable correctly for this? Config.spec tells me tha "Folder names are as described in the documentation for the relevant Email::Folder type" but said docs are sparse and unhelpful for mbox format as far as I can tell.

-- VickiBrown - 30 May 2007

I solved my problems: firstly my user logs in as twiki@brightcarvingsPLEASENOSPAM.com, so my parameter must look like:

imap://twiki@brightcarvings.com:XXXXX@brightcarvings.com/INBOX

yes, it does work wih two "@" in the line. Secondly though the CPAN information on EMAIL:FOLDER:IMAP says that the default is to scan the inbox I had to specify INBOX (in capitals) to get it to work with Courier.

-- ChrisHogan - 31 May 2007

Can someone enlighten me as to what

Skipping; late: 1180484065 <= 1181602875
means, and why I should care? (and how I work around this?

-- VickiBrown - 11 Jun 2007

It means that a mail in your inbox is timestamped before the most recent import. It only appears if you have debugging on. Normally the contrib is configured to delete processed mails from the inbox, but sometimes IMAP has troubles deleting mails from boxes and this message gets generated.

Check if the mail was imported, and delete it using a mail tool if it was. It's probably not a problem.

-- CrawfordCurrie - 12 Jun 2007

if debugging is on, how can there be a most recent import? :-)

But, if this only appears suring a debuggins session, then I will stop wondering how to turn it off.

-- VickiBrown - 13 Jun 2007

Hi, when I run the following command, nothing happens at all. I get absolutely no output. Please help.

perl -I bin tools/mailincron debug=1

or

perl -I bin tools/mailincron

or

./mailincron

Get's nothing...

-- JosephThomas - 09 Jul 2007

Then there is probably nothing to do. Have you configured the IMAP folders correctly? People often have problems with trailing slashes and inbox name, that seem to be rather delicate with some mail servers. Also, use cd bin && perl ../tools/mailincron -debug 1 to ensure you get the right paths (though i would expect a perl error if that was wrong)

-- CrawfordCurrie - 11 Jul 2007

I'm stiill trying to get all the way through a debug. Right now, I'm seeing this

Message from Vicki Brown <vlb@foo-inc.com>: Web.CouncilListJul2007:] TWiki naming scheme
Can't locate object method "findUser" via package "TWiki" at /Users/vbrown/Sites/vtwiki/lib/TWiki/Contrib/MailInContrib.pm line 179, <GEN0> line 8171.
 at /Users/vbrown/Sites/vtwiki/lib/TWiki/Contrib/MailInContrib.pm line 46
        TWiki::Contrib::MailInContrib::__ANON__('Can\'t locate object method "findUser" via package "TWiki" at...') called at /Users/vbrown/Sites/vtwiki/lib/TWiki/Contrib/MailInContrib.pm line 179
        TWiki::Contrib::MailInContrib::processInbox('TWiki::Contrib::MailInContrib=HASH(0x1801500)', 'HASH(0x18661d4)') called at ../tools/mailincron line 57
battletalk:/WWW/vtwiki/bin vlbtwiki$ 

fiindUser seems to exist in several places in my lib directory... There's definitely a VickiBrown user. In fact, that's my default user.

-- VickiBrown - 06 Aug 2007

I have installed MailInContrib using the plugin installer in configure...now what? Based on examples above I believe I add a line to LocalSite.cfg based on information in Config.spec. There's no information on how to configure on the main page. I feel as though I am missing something.

-- ChrisPurves - 23 Aug 2007

I had some trouble getting things to work when sending from a non-TWiki user e-mail address. I found a page somwhere that suggested to replace line 180 from MailInContrib.pm:

($user = $TWiki::Plugins::SESSION->findUser( $box->{user} ))) {

with

($user = $TWiki::Plugins::SESSION->{users}->findUser( $box->{user} ))) {

and it is working now. Before I would get findUser errors.

-- ChrisPurves - 30 Aug 2007

The main thing I wanted to be able to do with this contrib module is to use for the autogeneration of meeting minutes from a Word file, working in combination with MsOfficeAttachmentsAsHTMLPlugin. Unfortunately, that doesn't seem to work. If a .doc file is attached to the e-mail it is appended to the topic, bypassing MsOfficeAttachmentsAsHTMLPlugin. Any ideas on how to get this to do what I want?

What I hoped would happen is when an e-mail contained a .doc attachment MsOfficeAttachmentsAsHTMLPlugin would take over and convert to HTML, creating a new topic containing the contents of the .doc file.

-- ChrisPurves - 30 Aug 2007

Odd; the beforeAttachmentSaveHandler, which I believe the MsOfficeAttachmentsAsHTMLPlugin (correctly) uses, is called from the guts of the Store, so it ought to be called when MailInContrib saves the attachment. All I can suggest is that you do some debugging to find out why that isn't happening (or ask a perl expert if you are not one)

-- CrawfordCurrie - 31 Aug 2007

BUGS:

($user = $TWiki::Plugins::SESSION->{users}->findUser( $box->{user} ))) {

  • in sub _saveTopic, there needs to be a comment explaining that the $insert variable is initialized from %TWIKIWEB%/MailInContribTemplate and that the recommended way to chhange the look and feel of the output pages is to copy MailInContribTemplate as MailInContribUserTemplate and edit to taste.

-- VickiBrown - 07 Sep 2007

Some questions:

  • How to use user defined templates? Description on MailInContribTemplate is not clear for me. The use case appreciated,
  • Is it possible to preserve HTML formatting from the e-mail in the twiki destination topic? All e-mails I send get transformed to plaintext.

-- JacekZapotoczny - 11 Sep 2007

For those interested in using this contrib module with MsOfficeAttachmentsAsHTMLPlugin, see MailInContribWithMSOfficeAttachment. There is no problem with MailInContrib, but since I posted about it earlier I thought I would follow up.

-- ChrisPurves - 11 Sep 2007

I have modified my MailInContrib template (attached) to insert each new message with a level 2 header instead of a bullet.

I would dearly love to have each topic page include a TOC at the top. Can someone give me a hint as to what and where I need to edit the code to make this happen? What causes a new Topic to be created? How can I specify a topic template to use when that happens?

-- VickiBrown - 12 Sep 2007

When I'm installing MailinContrb i have following output: ... Checking dependency on TWiki::Plugins.... * MailInContrib depends on package TWiki::Plugins >=1.1 which is described as "This module requires TWiki-4" But when I tried to find it I got this error:

Module is type , and cannot be automatically checked. Please check it manually and install if necessary. ... I have Twiki version TWiki-4.1.2, Sat, 03 Mar 2007, build 13046, Plugin API version 1.11 what is wrong?

-- BertrandFeuerstein - 19 Sep 2007

Nothing. Just ignore it, it's a warning.

-- CrawfordCurrie - 24 Sep 2007

I installed mailincontrib but I do not see it in the plugins list under configure. I went to the link where you find plugins to install, and it showed me and upgrade link for mailincontrib. I have added the configuration to localsite.cfg. when I run mailincron I get this output.

Can't call method "getWorkArea" on an undefined value at /home/httpd/twiki/lib/TWiki/Func.pm line 1950. at /home/httpd/twiki/lib/TWiki/Contrib/MailInContrib.pm line 46 TWiki::Contrib::MailInContrib::__ANON__('Can\'t call method "getWorkArea" on an undefined value at /ho...') called at /home/httpd/twiki/lib/TWiki/Func.pm line 1950 TWiki::Func::getWorkArea('MailInContrib') called at /home/httpd/twiki/lib/TWiki/Contrib/MailInContrib.pm line 77 TWiki::Contrib::MailInContrib::new('TWiki::Contrib::MailInContrib', 'TWiki=HASH(0x8a351d4)', '') called at mailincron line 55

Not sure if I have done something silly or what, but I haven't seen anyone else report this error. What is going on? Thanks, Brian

-- BrianCook - 26 Sep 2007

"I installed mailincontrib but I do not see it in the plugins list under configure" - that's because its a contrib, not a plugin.

It sounds like you are trying to use the contrib on an old version of twiki (before the getWorkArea API was added. I forget when that was, but it was quite a while ago)

-- CrawfordCurrie - 27 Sep 2007

Hi, thanks for the reply. I understand now that it is not a plugin. I am running twiki 4.1.2 which I downloaded yesterday. I have perl 5.8.8 and I'm running it on Ubuntu Feisty Server if it helps. Thank you, Brian

-- BrianCook - 27 Sep 2007

Hi, is there a solution for the problem with getWorkArea call, I am experiencng the same here , running TWiki-4.1.2, Sat, 03 Mar 2007, build 13046, with mailincontrib hooked to a cron script getting mail from an IMAP server. Thanks, in advance for the hints, I am really keen to test the MailInContrib smile Best Regards, Yavor

-- YavorGeorgiev - 23 Oct 2007

Not to pile on, but I'm getting the same error regarding getWorkArea. I'm running TWiki on Gutsy Gibbon. I've noticed that the paths under the Ubuntu installation of TWiki seem to defeat the expectations of the various plugin installers.

DB<2>
TWiki::Func::getWorkArea(/usr/share/perl5/TWiki/Func.pm:1950):
1950:       return $TWiki::Plugins::SESSION->{store}->getWorkArea( $plugin );

DB<2>
Can't call method "getWorkArea" on an undefined value at /usr/share/perl5/TWiki/Func.pm line 1950.

So the problem is that $TWiki::Plugins::SESSION is undefined at this point. I ran the debugger like so:

cd /usr/lib/cgi-bin/twiki
perl -d mailincron debug=on

I've seen the same error message in /var/logs/apache2/error.log.

-- DavidHoughton - 27 Nov 2007

If you do not get feedback here you might want to file a bug report at Bugs:MailInContrib.

-- PeterThoeny - 02 Dec 2007

Here's a quick fix for anyone who's been struggling with the getWorkArea issue:

--- /usr/lib/cgi-bin/tools/mailincron   (revision 69)
+++ /usr/lib/cgi-bin/tools/mailincron   (local)
@@ -50,6 +50,7 @@
     eval "use LocalSite.cfg";
 } else {
     $twiki = new TWiki();
+    $TWiki::Plugins::SESSION = $twiki;
 }
 $folders = $TWiki::cfg{MailInContrib};
 my $processor = new TWiki::Contrib::MailInContrib($twiki, $debug);
Add that line and mailincron should start working.

-- DavidHoughton - 06 Dec 2007

Thanks David; that ought to happen automatically when you new TWiki, but I guess not. I'll incorporate your fix, thanks!

-- CrawfordCurrie - 07 Dec 2007

TWikibug:Item5095 closed.

-- CrawfordCurrie - 07 Dec 2007

Fine work. Are you working on integrating MailIn with the TagMe plug? I'm relying quite heavily on tags for findability, and if mailed-in pages don't have tags, they get lost. I think that adding a tag facility to MailIn would further increase the usefulness of TWiki overall.

My recommendation for how it should work: Users should be able to add tags in the body of the mail. trying to fit them into the subject line would be too cluttered. Something very simple and non-technical looking, like...

.tag1 .tag2 .tag with spaces .tag3

Important to make it look easy. (Because wikitext is frightening for 90% of the population. Really).

-- PhilipBarrett - 22 Dec 2007

Great extension but I'm running into a problem when testing from the command line:

[Wed Jan 30 11:38:34 2008] mailincron: Use of uninitialized value in numeric eq (==) at /usr/lib/perl5/5.8.7/Net/POP3.pm line 315.
Emails that have been added to a topic are also not getting deleted and i have this in LocalSite.cfg:
onSuccess => 'delete',

Any help is greatly apprecaited!

-- StephanieDalPra - 30 Jan 2008

PhilipBarrett - interesting idea, but I personally have no plans to support this. Anyone else is welcome to contribute code, though.

StephanieDalPra - looks like the delete command is getting lost in your mail server. That error indicates that the server responded with a null status code to some request (can't tell which). Switch to IMAP if you can.

-- CrawfordCurrie - 01 Feb 2008

The documentation says that the "Folder" setting can be used to point it at a POP or IMAP folder, yet the "TopicPath" says it can look at the "To" field. If you have to specify the username/password in the "Folder" setting wouldn't all the "To" fields be the same? Is there a way to point this at the mail store for a full IMAP install?

I'd like users to be able to email in contributions by sending mail to Web.Topic@twikiPLEASENOSPAM.domain.com is this doable?

-- TomCorrigan - 15 Apr 2008

A user on IRC just ran into the following problem trying to use MailInContrib with IMAP:

Can't locate object method "host_port" via package "URI::_foreign" at /usr/share/perl5/Email/Folder/IMAP.pm line 26.
 at /www/docroot/twiki/lib/TWiki/Contrib/MailInContrib.pm line 45

The URI::imap dependency was missing on his system. Maybe we should mention the deps for the common backends in the docco. smile

-- OliverKrueger - 23 May 2008

I note from the code:

# the $insert variable is initialized from # TWiki06x00/MailInContribTemplate and the recommended way to change # the look and feel of the output pages is to copy # MailInContribTemplate as MailInContribUserTemplate and edit to # taste. - VickiBrown - 07 Sep 2007

I tried creating WebName.MailInContribUserTemplate but that didn't seem to work. Should it?

-- MartinCleaver - 25 Jul 2008

Incidentally, if you use a Catch-all mailbox on the domain you are free to use the subject as you please.

-- MartinCleaver - 25 Jul 2008

This is starting to work quite well!

Minor details in the documentation:

  • Another dependency is: Email::Folder::POP3
  • Syntax for redirecting stderr to stdout is 2>&1 not 2&>1, as shown in the cron example.

THANKS! (Good work).

-- RaymondLutz - 09 Dec 2008

Can it support a raw mail file, like /var/mail/user ? I try it, but mailincron do nothing and print nothing.

-- BoGao - 2010-02-08

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt MailInContribUserTemplate.txt r1 manage 1.0 K 2007-09-12 - 17:15 VickiBrown each new message has a header which is the subject
Edit | Attach | Watch | Print version | History: r75 < r74 < r73 < r72 < r71 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r75 - 2010-02-08 - BoGao
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.