[rt-users] notification

Kenneth Crocker kfcrocker at lbl.gov
Fri Dec 10 14:28:06 EST 2010


Kurt,

Here's a suggestion:

1) Create a CustomField that will hold the "To:" Address you create from
your scrip.
2) Make the privileges for that CF so no one can see it or modify it (RT
will be able to in the scrip). This way the CF does clutter up ticket
display.
3) Build a template to pull the value of that customField into the "To:"
address.
4) Create a notification scrip to use that template, action "Notify Others"
based on your required condition.

That should work.

Kenn
LBNL

On Fri, Dec 10, 2010 at 11:07 AM, Kurt Engle <engle at 4j.lane.edu> wrote:

> Actually found a nice example of creating a template to send out an e-mail.
> RTFM....
>
> However, I am having a bit of a problem constructing the To: field.
> Basically, I have a varialble '$toAddress' that is set to an e-mail address
> by some prior code.
>
> Here is my template code to construct the To: field:
> To: { $toAddress }
> Subject: Ticket #{ $Ticket->Id()} {$Ticket->Subject()}
> A new ticket has been created for you in the HelpDesk Queue.
>
> { $RT::WebURL } Ticket/Display.html?id={ $Ticket->Id() }
>
> However, I keep getting 'recipient not found'.
>
> Kurt Engle
>
>
> ------------------------------
> *From: *"Kevin Falcone" <falcone at bestpractical.com>
> *To: *rt-users at lists.bestpractical.com
> *Sent: *Friday, December 10, 2010 10:03:04 AM
>
> *Subject: *Re: [rt-users] notification
>
> On Fri, Dec 10, 2010 at 09:55:07AM -0800, Kurt Engle wrote:
> >    That is correct. But how do I make use of the RT::Action::SendEmail
> module to send the
> >    notification incorporating my To: field. Or is there a better way to
> send out a custom
> >    notification?
>
> You use one of the standard Notify actions and a custom template.  You
> don't write any code in the action and you don't call the action
> directly.
>
> -kevin
>
> >    From: "Kevin Falcone" <falcone at bestpractical.com>
> >    To: rt-users at lists.bestpractical.com
> >    Sent: Friday, December 10, 2010 8:59:25 AM
> >    Subject: Re: [rt-users] notification
> >
> >    On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote:
> >    >    I am looking for a way to send an email from RT to a specified
> e-mail address that is not
> >    an
> >    >    account in RT or associated with the ticket as a requestor,
> watcher, CC:, BCC:...etc....
> >    >
> >    >    I have the logic down to specify the e-mail address and have some
> nasty perl code to
> >    actually
> >    >    send the e-mail. But, it seems that RT has some internal
> module(s) that handle what the
> >    nasty
> >    >    perl code is doing.
> >    >
> >    >    I can see the RT::Action:SendEmail module, but how do I
> incorporate that into a script
> >    that
> >    >    allows me to do what I am looking to do?
> >
> >    Sounds like you actually just want to use a normal Notify action, but
> >    have the template contain your ugly logic that sets up the To: line
> >    based on your perl code
> >
> >    -kevin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20101210/9025b090/attachment.htm>


More information about the rt-users mailing list