[rt-users] IncomingEmail insert script for RT3

James L. Harrison harrison at palisadesys.com
Tue Apr 15 10:36:14 EDT 2003


Hi Again All,

Well after some hacking I have gotten the IncomingEmail insert script (by
Bruce) working...
I have cross posted this because I had threads going on both lists looking
for help..

It is posted here:
http://palisadesys.com/~harrison/
http://palisadesys.com/~harrison/IncomingEmail.pm
http://palisadesys.com/~harrison/IncomingEmail.pm.insert.pl
http://palisadesys.com/~harrison/OnIncomingEmail.pm.insert.pl

Just run the proper insert script and then copy IncomingEmail.pm into
<your-rt-path>/lib/RT/Condition/

The IncomingEmail.pm.insert.pl creates a scrip that will fire anytime an
email is received by RT.  The OnIncomingEmail.pm.insert.pl will create a
scrip that will fire only when a ticket is created.

I did have to do a couple of things to the RT code... I would like to make
sure that this won't break anything...

On line 123 of RT.pm I changed:
$Handle = RT::Handle->new();
To:
$Handle = new RT::Handle($RT::DatabaseType);

Additionally, I had to hardcode the DatabaseType in Handle.pm line 49 and
50... It was:
eval "use DBIx::SearchBuilder::Handle::$RT::DatabaseType;
\@ISA= qw(DBIx::SearchBuilder::Handle::$RT::DatabaseType);";
Now:
eval "use DBIx::SearchBuilder::Handle::mysql;
\@ISA= qw(DBIx::SearchBuilder::Handle::mysql);";

Have I broken something else by doing this?  Should this be patched?

-Jamie

---
James L. Harrison
harrison at palisadesys.com
Technical Support Engineer
Palisade Systems
515.296.0701




More information about the rt-users mailing list