Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Devel

Send Template with external scrip

 

 

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded


icardona at serialnet

Jan 18, 2011, 7:00 AM

Post #1 of 3 (920 views)
Permalink
Send Template with external scrip

Hello,

I have an external scrip with this code:

my $template = RT::Template->new($RT::SystemUser);
$template->LoadGlobalTemplate('blablabla');

my $MIMEObj = $template->MIMEObj;
$MIMEObj->head->set('To', $emailTelefonica);

But I view this error "Can't call method "head" on an undefined value"

Could you help me?

Thank you so much!
--
Serialnet SL

* IBAN CARDONA I SUBIELA*
SERIALNET NETWORKING I SOFTWARE LLIURE SL
c/Bailèn, 71Bis 5è 3a
08009 - Barcelona
Tel. 93 265 09 37
http://www.serialnet.cat
LINKEDIN:http://www.linkedin.com/in/icsbcn
<http://www.linkedin.com/in/icsbcn>

------------------------------------------------------------------------
Attachments: signatura.gif (4.21 KB)


elacour at easter-eggs

Jan 26, 2011, 5:02 AM

Post #2 of 3 (824 views)
Permalink
Re: Send Template with external scrip [In reply to]

On Tue, Jan 18, 2011 at 04:00:37PM +0100, Iban Cardona i Subiela wrote:
> Hello,
>
> I have an external scrip with this code:
>
> my $template = RT::Template->new($RT::SystemUser);
> $template->LoadGlobalTemplate('blablabla');
>
> my $MIMEObj = $template->MIMEObj;
> $MIMEObj->head->set('To', $emailTelefonica);
>
> But I view this error "Can't call method "head" on an undefined value"
>

you have to first call $template->Parse( Argument => ..., TicketObj => ..., TransactionObj => ...);

then MIMEObj method will return a valid Entity (currently it should
returns undef without first calling Parse).

_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


icardona at serialnet

Jan 26, 2011, 5:06 AM

Post #3 of 3 (820 views)
Permalink
Re: Send Template with external scrip [In reply to]

Yes! It runs!

Thank you so much!

On 01/26/2011 02:02 PM, Emmanuel Lacour wrote:
> On Tue, Jan 18, 2011 at 04:00:37PM +0100, Iban Cardona i Subiela wrote:
>> Hello,
>>
>> I have an external scrip with this code:
>>
>> my $template = RT::Template->new($RT::SystemUser);
>> $template->LoadGlobalTemplate('blablabla');
>>
>> my $MIMEObj = $template->MIMEObj;
>> $MIMEObj->head->set('To', $emailTo);
>>
>> But I view this error "Can't call method "head" on an undefined value"
>>
> you have to first call $template->Parse( Argument => ..., TicketObj => ..., TransactionObj => ...);
>
> then MIMEObj method will return a valid Entity (currently it should
> returns undef without first calling Parse).
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>

--
Serialnet SL

* IBAN CARDONA I SUBIELA*
SERIALNET NETWORKING I SOFTWARE LLIURE SL
c/Bailèn, 71Bis 5è 3a
08009 - Barcelona
Tel. 93 265 09 37
http://www.serialnet.cat
LINKEDIN:http://www.linkedin.com/in/icsbcn
<http://www.linkedin.com/in/icsbcn>

------------------------------------------------------------------------
Attachments: signatura.gif (4.21 KB)

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.