[Rt-devel] Send Template with external scrip
Emmanuel Lacour
elacour at easter-eggs.com
Wed Jan 26 08:02:09 EST 2011
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).
More information about the rt-devel
mailing list