[rt-users] Issues with rich formatted mails

Ruslan Zakirov ruslan.zakirov at gmail.com
Thu Sep 1 06:38:58 EDT 2005


On 9/1/05, Bjørn Skovlund Rydén <bjorn at 247ms.com> wrote:
> > -----Original Message-----
> > From: Ruslan Zakirov [mailto:ruslan.zakirov at gmail.com]
> 
> > What is "rich formatted" text? Is it html? Or .rtf
> > attachment?
> 
> HTML from Outlook or "Rich text" from gmail. Haven't tried other options.
> 
> > Does email source have text/plain alternative
> > part of the "rich formatted"
> > part?
> 
> Hmm.. Not sure. I would say it does, atleast RT has a plain text alternative stored as a downloadable item.
So you need something like:
...
my $attachs = $self->TransactionObj->Attachments;
my $attach;
while( my $a = attachs->Next ) {
   if( $a->ContentType eq 'text/plain' ) { $attach = $a; last }
}
return( 0, "Couldn't find text attachment" ) unless $attach;
...
in this code you should use $attach->Content as message content.
...

I didn't test this code, but something like this should work.
> 
> > On 8/31/05, Bjørn Skovlund Rydén <bjorn at 247ms.com> wrote:
> > > Hi
> > >
> > > I've tried using the SetTicketPropertiesViaMail, in a
> > slightly modified version. After a bit of troubleshooting, I
> > found that it has serious issues with rich formatted texts.
> > > $self->TransactionObj->Attachments->First->Content doesn't
> > return any text if it's a rich format email. How would I go
> > about fixing this?
> 


-- 
Best regards, Ruslan.



More information about the rt-users mailing list