[rt-users] choosing template on the fly - part 2
Ruslan U. Zakirov
Ruslan.Zakirov at acronis.com
Wed Dec 8 16:32:31 EST 2004
Dimitry Faynerman wrote:
> Hello,
>
> Here's the original discussion about selecting template based on user's
> language:
>
> http://lists.bestpractical.com/pipermail/rt-users/2004-May/023084.html
>
> and here's the solution posted on wiki:
>
> http://wiki.bestpractical.com/index.cgi?action=revisions&page_id=ChooseTempl
> ateByUserLang&revision_id=-1
>
> this worked fine as long as tickets were created from RT.
> However, now we need to create tickets by mail. We have separate scripts for
> sending email for different languages.
>
> So what I did was added a line to email header:
>
> "X-RT-LANG" => "ja",
>
> so that I could see which language to use. Then in the
> RT::Interface::Email::CreateUser I use something like this:
>
>
> my ($Val, $Message) =
> $NewUser->Create(Name => ($Username || $Address),
> EmailAddress => $Address,
> RealName => $Name,
> Password => undef,
> Privileged => 0,
> Comments => 'Autocreated on ticket submission',
> Lang => $ParsedRTLang
> );
>
>
> so the user's language is setup as passed in the email header, and I
> expected that that would be enough to force RT to use template selection
> described in part 1.
>
> However, for some reason it doesn't work. It seems to me that SendMail.pm is
> not even being called when a ticket gets created from email. Is that true,
> and if so what can I do about this?
Don't understand why SendMail.pm should be called on create? Do you mean
AutoReply scrip?
>
> Thanks,
>
> Dimitry
>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT wiki at http://wiki.bestpractical.com
More information about the rt-users
mailing list