Browse the Ruby on Rails Community.

You are here: Forums Ask a Rails expert Tmail cant read MS-Outlook mai...

Replytotopic

Tmail cant read MS-Outlook mails perfectly

Posted in Forums : Ask a Rails expert

 
Profile

Authority 25
Posting Rating 0
Sign in to rate this post

Hi,

Our application (www.qlubb.com) is using Tmail to receive mails. It works perfectly for all the mails, except for MS-Outlook.In case of outlook it adds some text above the body making the message unreadable.

Here is what gets inserted above the body of the mail:

<!—[if gte mso 9]>

<—[if gte mso 9]>

<![endif]—>

Here is the header of the test mail:

Message-Id: <4a3106e5aaebf_2ce9..fdbed58d63f3@domU-12-31-38-00-BD-42.tmail>
Subject: This is test mail from Outlook 2007
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=mimepart_4a3106e5b5116_2ce9..fdbed58d6477
X-Server-Quench: 014efb2c-568c-11de-8e8d-001185d377ca
X-AuthRoute: OCdwYw4SBVZfSxkc AS4IJDZEVA8vYBZL BAkGMA9GIUINWEQI bwdMdwMUEkAaAgsB A28bWlBeU117WGs7 bA9PbAVcfEtLWhtj UVdLR01SWlttc2hk fk1MUhx7dw1BNnx4 YEQsXnFfCRIodxVg R0hcRnAHZDM1dWhK WBRFdwNVcQtPKhxC bQMuGhdVOCYXPzlw AwIoI3g0NDRbYCpP RQRFCk8ORUEMHXZm H0hddW5h
X-Authentic-SMTP: 61633333363736.squirrel.dmpriest.net.uk:1562/Kp
X-Report-SPAM: If SPAM / abuse – report it at: http://www.authsmtp.com/abuse
X-Virus-Status: No virus detected – but ensure you scan with your own anti-virus system.

—mimepart_4a3106e5b5116_2ce9..fdbed58d6477
Content-Type: multipart/alternative; boundary=mimepart_4a3106e5b54fd_2ce9..fdbed58d65a4

—mimepart_4a3106e5b54fd_2ce9..fdbed58d65a4
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: Quoted-printable
Content-Disposition: inline

<html xmlns:v="3D"urn:schemas-microsoft-com:vml"" xmlns:o="3D"urn:schemas-mi=<br" />
i”>
<meta name="3DGenerator" 12 word content="3D"Microsoft">

<!—[if gte mso 9]><xml>
<o:shapedefaults spidmax="3D"1026"" v:ext="3D"edit"" />


</xml><—[if gte mso 9]><xml>
= <o:shapelayout v:ext="3D"edit"">
<o:idmap v:ext="3D"edit"" data="3D"1"" />


</o:shapelayout></xml><![endif]—>
</head>
<body vlink="3Dpurple" lang="3DEN-US" link="3Dblue">

Fight Club,<o:p></o:p>


Plz check this mail for any garbage data in header.<=
o:p></o:p>


<o:p> </o:p>


-Nilesh<o:p></o:p>



</body>
</html> =

-mimepart_4a3106e5b54fd_2ce9..fdbed58d65a4-

-mimepart_4a3106e5b5116_2ce9..fdbed58d6477-

I would really appreciate any help in fixing this.

Thanks,
Atul Veer.

 
Amit

Authority 37
Posting Rating 95
Sign in to rate this post

Hi Atul

I  also faced same problem , i found that outlook  add this piece of code

what i did
a= message.to_s a.sub(‘<!—[if gte mso 9]>

<—[if gte mso 9]>

<![endif]—>’,’‘)
now it will remove ,

 
Profile

Authority 25
Posting Rating 0
Sign in to rate this post

Hi Amit,

Thanks for your reply. This static substitution will solve the problem but this string pattern is not the only thing that gets inserted. The insertion behavior is not predictable sometimes Outlook inserts ”<supportLists]>n <![endif]>” . Writing regular expression is another solution but then the content-type of the mail is html which is creating some problem. What I was actually looking for was a patch to Tmail which fixes this issue. I found one solution in this post but its not working and that patch was for older version of Tmail and I am on rails 2.3.2 so most probably that patch must have been included in new Tmail.I have sent this problem to Mikel – Tmail maintainer and have also posted it in Tmail’s mailing list. I am waiting for their response. The last option I have is to write a regexp to fix this.

Do let me know if you have any other idea regarding this.

Thanks,
Atul.

Replytotopic

Other Recent Topics

Ask a Rails expert : nested application ApplicationController get called intead of children::ApplicationController

Ask a Rails expert : Best way to structure a database for a large/static dataset

Ask a Rails expert : Ruby Developer (ROR) - Scottish based (Remote working from within the UK)

Ask a Rails expert : Above Ground Pool Supplies

Ask a Rails expert : How to get url params in observer or model in Rails 3.1

Ask a Rails expert : What can persuade you to hire Junior Ruby devs with significant PHP experience?

Ask a Rails expert : What industry value does the Ruby or Rails Certification currently have?

Ask a Rails expert : Louis Vuitton Damier Azur Canvas specially sale ( www.salecheaplouisvuitton.com )

Ask a Rails expert : ·How to check errors/puts statements from ruby files which are under cronob

Ask a Rails expert : Louis Vuitton cheap Soft Sided Luggagespecial offer( www.salecheaplouisvuitton.com )

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel