[rt-users] Problem with rt-crontool and SendEmail(Re-posted because I did not register before posting it originally)

Kevin Falcone falcone at bestpractical.com
Mon Dec 6 14:07:34 EST 2010


On Mon, Dec 06, 2010 at 05:06:08AM -0800, imonike wrote:
> 
> Hello all,
>               Please I am having problems setting up rt-crontool and using
> the SendEmail action. I have created a user called rtcrontool, and in this
> user's home directory, I have set-up a shell script called rtcrontool.sh
> with the following command in it:
> 
> /opt/rt3/bin/rt-crontool \
>  --search RT::Search::ActiveTicketsInQueue  --search-arg 'nigerian colleges'
> \
>  --condition RT::Condition::Overdue \
>  --action RT::Action::SendEmail --action-arg amohammed at swglobal.com \

I'm curious where you found this syntax, since the argument to
SendEmail is not an email address, it is a string that can be passed
into your Template for parsing.  If it was found on the wiki, it
should be corrected.

> I haven't yet set it up as a cron job but when I run the script from the
> command line this is what I get:
> 
> 
>  [crit]: Can't call method "Parse" on an undefined value at
> /opt/rt3/bin/../lib/RT/Action/SendEmail.pm line 155.
> (/opt/rt3/bin/../lib/RT.pm:377)
> Can't call method "Parse" on an undefined value at
> /opt/rt3/bin/../lib/RT/Action/SendEmail.pm line 155.

You haven't provided a template, and SendEmail needs a template to
know *what* to send.

What you want to do is define a template with the To: address either
passed in as the $Argument or hardcoded along with the content and
then try again.

-kevin

> I have tried googling a solution to no avail. Please any pointers as to how
> to resolve this issue will be greatly appreciated.
> Thanks
> -- 
> View this message in context: http://old.nabble.com/Problem-with-rt-crontool-and-SendEmail%28Re-posted-because-I-did-not-register-before-posting-it-originally%29-tp30366714p30366714.html
> Sent from the Request Tracker - User mailing list archive at Nabble.com.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20101206/6cb83e16/attachment.sig>


More information about the rt-users mailing list