Sending Email to CustomField value

Hi All ,

Could you please help me in creating a scrip that sends emails to
email addresses noted in custom field values .

So say in CF1 i have johndoe@abc.com
And in CF2 i have mjames@abc.com .

Upon case closure I would like to emails (different content) to be
sent to the above to CFs .

Any help would be much appreciated .

Regards

Vikas

Vikas,

We do that thru the Template. Below is an example of what we do to send an
email to a person selected to be the QA tester/Approver of work before it is
migrated/resolved:

RT-Attach-Message: yes

TICKET INFORMATION:
Queue : {$Ticket->QueueObj->Name}
Number : {$Ticket->Id}
Priority is: {$Ticket->Priority}
Requestor : {$Ticket->Requestors->UserMembersObj->First->Name}
Created by: {$Ticket->CreatorObj->Name}
Created on: {substr($Ticket->Created, 0, 10)}
Owned by: {$Ticket->OwnerObj->Name}
Development Started on: {substr($Ticket->Started, 0, 10)}
To indicate your approval of the QA test results, merely
"Reply" (only) to this email with your comments:

                    Thank you,
                    {$Ticket->QueueObj->CorrespondAddress()}

We like to include a lot of Ticket data in our emails to the recipients. All
of out templates are custom.

Hope this helps.

Kenn
LBNLOn Fri, Feb 11, 2011 at 8:00 AM, Vikas Srivastava < vikas.k.srivastava@gmail.com> wrote:

Hi All ,

Could you please help me in creating a scrip that sends emails to email addresses noted in custom field values .

So say in CF1 i have johndoe@abc.com
And in CF2 i have mjames@abc.com .

Upon case closure I would like to emails (different content) to be sent to the above to CFs .

Any help would be much appreciated .

Regards

Vikas

Hi Kenn ,

Thank you so much , but for some reasons I am not able to get it working .

Here is what I did .

Created A Template :

Name : Send Email to Customer on Closure
Description : Send Email to Customer on Closure
Content:

RT-Attach-Message: yes

    Some Content here .

Created A Scrip :

Description : Email On closure
Condition : On Resolve
Action : User Defined
Template : Send Email to Customer on Closure
Stage : TransactionCreate

Custom condition: return 1;
Custom action preparation code:return 1;
Custom action cleanup code:return 1;

When I resolved the case no email is sent to the email address mentioned in
the Custom field named “Customer Email”

Appreciate your inputs .

Regards

VikasOn Fri, Feb 11, 2011 at 8:52 AM, Kenneth Crocker kfcrocker@lbl.gov wrote:

Vikas,

We do that thru the Template. Below is an example of what we do to send an
email to a person selected to be the QA tester/Approver of work before it is
migrated/resolved:

RT-Attach-Message: yes
To: {$Ticket->FirstCustomFieldValue(‘QA Approver’)}
Subject: Request Titled: “{$Ticket->Subject}” is ready to begin QA Testing


TICKET INFORMATION:
Queue : {$Ticket->QueueObj->Name}
Number : {$Ticket->Id}
Subject: {$Ticket->Subject}


Priority is: {$Ticket->Priority}
Requestor : {$Ticket->Requestors->UserMembersObj->First->Name}
Created by: {$Ticket->CreatorObj->Name}
Created on: {substr($Ticket->Created, 0, 10)}
Owned by: {$Ticket->OwnerObj->Name}
Development Started on: {substr($Ticket->Started, 0, 10)}


To indicate your approval of the QA test results, merely
"Reply" (only) to this email with your comments:

                    Thank you,
                    {$Ticket->QueueObj->CorrespondAddress()}

We like to include a lot of Ticket data in our emails to the recipients.
All of out templates are custom.

Hope this helps.

Kenn
LBNL

On Fri, Feb 11, 2011 at 8:00 AM, Vikas Srivastava < vikas.k.srivastava@gmail.com> wrote:

Hi All ,

Could you please help me in creating a scrip that sends emails to email addresses noted in custom field values .

So say in CF1 i have johndoe@abc.com
And in CF2 i have mjames@abc.com .

Upon case closure I would like to emails (different content) to be sent to the above to CFs .

Any help would be much appreciated .

Regards

Vikas

Hi Kenn ,

Any pointers on the following please . Still struggling to get this working
.

Regards

VikasFrom: Vikas Srivastava vikas.k.srivastava@gmail.com
Date: Fri, Feb 11, 2011 at 3:48 PM
Subject: Re: [rt-users] Sending Email to CustomField value
To: Kenneth Crocker kfcrocker@lbl.gov
Cc: rt-users@lists.bestpractical.com

Hi Kenn ,

Thank you so much , but for some reasons I am not able to get it working .

Here is what I did .

Created A Template :

Name : Send Email to Customer on Closure
Description : Send Email to Customer on Closure
Content:

RT-Attach-Message: yes
To: {$Ticket->FirstCustomFieldValue('Customer Email')}

Subject: Request Titled: "{$Ticket->Subject}"

    Some Content here .

Created A Scrip :

Description : Email On closure
Condition : On Resolve
Action : User Defined
Template : Send Email to Customer on Closure
Stage : TransactionCreate

Custom condition: return 1;
Custom action preparation code:return 1;
Custom action cleanup code:return 1;

When I resolved the case no email is sent to the email address mentioned in
the Custom field named “Customer Email”

Appreciate your inputs .

Regards

Vikas

Vikas,

RT provides some basic Conditions and actions. You’ve put code in for a
Custom Condition, yet you specifiy the basic “On Resolve”. That’s
redundant. Get ride of the Custom COndition Code.

However, that isn’tr the reason it doesn’t work. You specified
"User-Defined" for your Action and I use “Notify Others”. Try that and get
ride of all that Custom Code.

Kenn
LBNLOn Mon, Feb 14, 2011 at 12:25 AM, Vikas Srivastava < vikas.k.srivastava@gmail.com> wrote:

Hi Kenn ,

Any pointers on the following please . Still struggling to get this working
.

Regards

Vikas

---------- Forwarded message ----------
From: Vikas Srivastava vikas.k.srivastava@gmail.com
Date: Fri, Feb 11, 2011 at 3:48 PM
Subject: Re: [rt-users] Sending Email to CustomField value
To: Kenneth Crocker kfcrocker@lbl.gov
Cc: rt-users@lists.bestpractical.com

Hi Kenn ,

Thank you so much , but for some reasons I am not able to get it working .

Here is what I did .

Created A Template :

Name : Send Email to Customer on Closure
Description : Send Email to Customer on Closure
Content:

RT-Attach-Message: yes
To: {$Ticket->FirstCustomFieldValue('Customer Email')}

Subject: Request Titled: "{$Ticket->Subject}"

    Some Content here .

Created A Scrip :

Description : Email On closure
Condition : On Resolve
Action : User Defined
Template : Send Email to Customer on Closure
Stage : TransactionCreate

Custom condition: return 1;
Custom action preparation code:return 1;
Custom action cleanup code:return 1;

When I resolved the case no email is sent to the email address mentioned in
the Custom field named “Customer Email”

Appreciate your inputs .

Regards

Vikas

On Fri, Feb 11, 2011 at 8:52 AM, Kenneth Crocker kfcrocker@lbl.govwrote:

Vikas,

We do that thru the Template. Below is an example of what we do to send an
email to a person selected to be the QA tester/Approver of work before it is
migrated/resolved:

RT-Attach-Message: yes
To: {$Ticket->FirstCustomFieldValue(‘QA Approver’)}
Subject: Request Titled: “{$Ticket->Subject}” is ready to begin QA Testing


TICKET INFORMATION:
Queue : {$Ticket->QueueObj->Name}
Number : {$Ticket->Id}
Subject: {$Ticket->Subject}


Priority is: {$Ticket->Priority}
Requestor : {$Ticket->Requestors->UserMembersObj->First->Name}
Created by: {$Ticket->CreatorObj->Name}
Created on: {substr($Ticket->Created, 0, 10)}
Owned by: {$Ticket->OwnerObj->Name}
Development Started on: {substr($Ticket->Started, 0, 10)}


To indicate your approval of the QA test results, merely
"Reply" (only) to this email with your comments:

                    Thank you,
                    {$Ticket->QueueObj->CorrespondAddress()}

We like to include a lot of Ticket data in our emails to the recipients.
All of out templates are custom.

Hope this helps.

Kenn
LBNL

On Fri, Feb 11, 2011 at 8:00 AM, Vikas Srivastava < vikas.k.srivastava@gmail.com> wrote:

Hi All ,

Could you please help me in creating a scrip that sends emails to email addresses noted in custom field values .

So say in CF1 i have johndoe@abc.com
And in CF2 i have mjames@abc.com .

Upon case closure I would like to emails (different content) to be sent to the above to CFs .

Any help would be much appreciated .

Regards

Vikas

You are a genius !!! I changed it to “Notify Others” and works perfect as
RT :slight_smile:

Thank you so much .

Kind Regards
Vikas SrivastavaOn Mon, Feb 14, 2011 at 9:23 AM, Kenneth Crocker kfcrocker@lbl.gov wrote:

Vikas,

RT provides some basic Conditions and actions. You’ve put code in for a
Custom Condition, yet you specifiy the basic “On Resolve”. That’s
redundant. Get ride of the Custom COndition Code.

However, that isn’tr the reason it doesn’t work. You specified
"User-Defined" for your Action and I use “Notify Others”. Try that and get
ride of all that Custom Code.

Kenn
LBNL

On Mon, Feb 14, 2011 at 12:25 AM, Vikas Srivastava < vikas.k.srivastava@gmail.com> wrote:

Hi Kenn ,

Any pointers on the following please . Still struggling to get this
working .

Regards

Vikas

---------- Forwarded message ----------
From: Vikas Srivastava vikas.k.srivastava@gmail.com
Date: Fri, Feb 11, 2011 at 3:48 PM
Subject: Re: [rt-users] Sending Email to CustomField value
To: Kenneth Crocker kfcrocker@lbl.gov
Cc: rt-users@lists.bestpractical.com

Hi Kenn ,

Thank you so much , but for some reasons I am not able to get it working .

Here is what I did .

Created A Template :

Name : Send Email to Customer on Closure
Description : Send Email to Customer on Closure
Content:

RT-Attach-Message: yes
To: {$Ticket->FirstCustomFieldValue('Customer Email')}

Subject: Request Titled: "{$Ticket->Subject}"

    Some Content here .

Created A Scrip :

Description : Email On closure
Condition : On Resolve
Action : User Defined
Template : Send Email to Customer on Closure
Stage : TransactionCreate

Custom condition: return 1;
Custom action preparation code:return 1;
Custom action cleanup code:return 1;

When I resolved the case no email is sent to the email address mentioned
in the Custom field named “Customer Email”

Appreciate your inputs .

Regards

Vikas

On Fri, Feb 11, 2011 at 8:52 AM, Kenneth Crocker kfcrocker@lbl.govwrote:

Vikas,

We do that thru the Template. Below is an example of what we do to send
an email to a person selected to be the QA tester/Approver of work before it
is migrated/resolved:

RT-Attach-Message: yes
To: {$Ticket->FirstCustomFieldValue(‘QA Approver’)}
Subject: Request Titled: “{$Ticket->Subject}” is ready to begin QA
Testing


TICKET INFORMATION:
Queue : {$Ticket->QueueObj->Name}
Number : {$Ticket->Id}
Subject: {$Ticket->Subject}


Priority is: {$Ticket->Priority}
Requestor : {$Ticket->Requestors->UserMembersObj->First->Name}
Created by: {$Ticket->CreatorObj->Name}
Created on: {substr($Ticket->Created, 0, 10)}
Owned by: {$Ticket->OwnerObj->Name}
Development Started on: {substr($Ticket->Started, 0, 10)}


To indicate your approval of the QA test results, merely
"Reply" (only) to this email with your comments:

                    Thank you,
                    {$Ticket->QueueObj->CorrespondAddress()}

We like to include a lot of Ticket data in our emails to the recipients.
All of out templates are custom.

Hope this helps.

Kenn
LBNL

On Fri, Feb 11, 2011 at 8:00 AM, Vikas Srivastava < vikas.k.srivastava@gmail.com> wrote:

Hi All ,

Could you please help me in creating a scrip that sends emails to email addresses noted in custom field values .

So say in CF1 i have johndoe@abc.com
And in CF2 i have mjames@abc.com .

Upon case closure I would like to emails (different content) to be sent to the above to CFs .

Any help would be much appreciated .

Regards

Vikas