[rt-users] Send Mail Scrip problems

Ken Crocker kfcrocker at lbl.gov
Tue Mar 17 12:58:43 EDT 2009


Andy,


    Did you remember to insert a "blank" line after the "to:" line. When 
you replace "Subject:", "From:", or "to:" (header replacement line) you 
MUST insert a blank line between them and the body of your template.
    Hope this helps.

Kenn
LBNL

On 3/15/2009 4:53 PM, Andy Smith wrote:
> Hi,
>
>    I am trying to use the example here:
>
> http://wiki.bestpractical.com/view/SendEmailAction
>
> to send emails based on custom conditions. I have this working using  
> hard coded destination mail addresses but when I try and use the  
> section in the template as described in the wiki:
>
> To: { my $GroupObj = RT::Group->new($user);
> $GroupObj->LoadUserDefinedGroup('Group Name');
> $GroupObj->MemberEmailAddressesAsString()}
>
>
> it doesn't work for me, I see this error in the system messages file:
>
> Mar 16 00:01:52 alpha RT: RT::Users=HASH(0x16b0a97c) was created  
> without a CurrentUser. Any RT object which is subclass of RT::Base  
> must be created with a RT::CurrentUser or a RT::User object as the  
> first argument. (/usr/local/lib/perl5/site_perl/5.8.9/RT/Base.pm:108)
> Mar 16 00:01:53 alpha RT: Template parsing error:  
> RT::Users=HASH(0x16b0a97c) was created without a CurrentUser at  
> /usr/local/lib/perl5/site_perl/5.8.9/RT/SearchBuilder.pm line 81       
> RT::SearchBuilder::_Init('RT::Users=HASH(0x16b0a97c)', undef) called  
> at /usr/local/lib/perl5/site_perl/5.8.9/RT/Users_Overlay.pm line 80     
>      RT::Users::_Init('RT::Users=HASH(0x16b0a97c)', undef) called at  
> /usr/local/lib/perl5/site_perl/5.8.9/DBIx/SearchBuilder.pm line 93      
>   DBIx::SearchBuilder::new('RT::Users', undef) called at  
> /usr/local/lib/perl5/site_perl/5.8.9/RT/Group_Overlay.pm line 843       
>    RT::Group::UserMembersObj('RT::Group=HASH(0x16b327ac)') called at  
> /usr/local/lib/perl5/site_perl/5.8.9/RT/Group_Overlay.pm line 878      
> RT::Group::MemberEmailAddresses('RT::Group=HASH(0x16b327ac)') called  
> at /usr/local/lib/perl5/site_perl/5.8.9/RT/Group_Overlay.pm line 899    
>       
> RT::Group::MemberEmailAddressesAsString('RT::Group=HASH(0x16b327ac)')  
> called at template line 3         eval 'package Text::Template::GEN2;  
> ; #line 1 template  my $GroupObj = RT::Group->new
> Mar 16 00:01:53 alpha kernel: oup->new
>
>
> Can anyone help? What is going wrong? This is on RT 3.8.2,
>
> thanks for any help, Andy.
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
>
>   




More information about the rt-users mailing list