Programmatically Sending Emails

Does anyone know if its possible to send an email from within a form?

I am updating several items on a ticket and I want to send one email
with all of this information, including a comment.

The problem is, the only way to identify, via a scrip, that this change
occurred is to watch a custom field change…however, I can’t get to the
content of the comment if I do this.

So, I would like to create the email in my form and have it sent out
that way.

Is this possible?

-Stark

This is probably a good candidate for a TransactionBatch (rather than
TransactionCreate) scrip; it lets you access all the transactions for a
specific event in a single scrip/template.

From within your template you cycle through each transaction, grab what
you need from each transaction, then build the mail using that collected
data. There are usable examples of this in The Book and on the wiki.

Regards,
Gene

At 07:52 AM 5/24/2007, Jeff Stark wrote:

Does anyone know if its possible to send an email from within a form?

I am updating several items on a ticket and I want to send one email with
all of this information, including a comment.

The problem is, the only way to identify, via a scrip, that this change
occurred is to watch a custom field change…however, I can’t get to the
content of the comment if I do this.

So, I would like to create the email in my form and have it sent out that way.

Is this possible?

-Stark

Gene LeDuc, GSEC
Security Analyst
San Diego State University

Thanks…I will give it a try.

-StarkFrom: Gene LeDuc [mailto:gleduc@mail.sdsu.edu]
Sent: Thu 5/24/2007 12:18 PM
To: Jeff Stark
Cc: rt-users
Subject: Re: [rt-users] Programmatically Sending Emails

This is probably a good candidate for a TransactionBatch (rather than TransactionCreate) scrip; it lets you access all the transactions for a specific event in a single scrip/template.

From within your template you cycle through each transaction, grab what you need from each transaction, then build the mail using that collected data. There are usable examples of this in The Book and on the wiki.

Regards,
Gene

At 07:52 AM 5/24/2007, Jeff Stark wrote:

Does anyone know if its possible to send an email from within a form?
 
I am updating several items on a ticket and I want to send one email with all of this information, including a comment.
 
The problem is, the only way to identify, via a scrip, that this change occurred is to watch a custom field change...however, I can't get to the content of the comment if I do this.
 
So, I would like to create the email in my form and have it sent out that way.
 
Is this possible?

-Stark

Gene LeDuc, GSEC
Security Analyst
San Diego State University