Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Email PDF Attachments are being received at text files.

Posted on 2008-06-24
Medium Priority
Last Modified: 2012-08-13
Problem:  Hopefully, I will be able to explain my issue with some clarity.  We have an application that creates an email and attaches a supporting document in a PDF format.  The email is being sent to two address.  The first address is to an email address where it is recieved and the data scraped and  populated into an HP Service Desk ticket with the associated attachment.     The second email is to an employee who is using MS Outlook 2003.  The employee receives that email with attachment and the attachment has a .pdf file extension as expected.  However when the Service Desk email arrives the attachment has a .txt file extension.  If you rename the file extention to .pdf then you can read the attachment using a pdf reader.
Information:  In the case of the employee email the path is from our Exchange Server (2003), to our customers Frontend Exchange Server (2003) to the employee's Outlook mailbox.
                     In the case of the Service Desk email the path is from our Exchange Server (2003), to our customers Frontend Exchange Server (2003) to a Unix box Gateway to the HP Service Desk Server.  When we look at the email header information it shows the data as being converted to base64.  See  email header information (Customer IP and Names removed):

Microsoft Mail Internet Headers Version 2.0
Received: from xxxxxxxx.na.xxxxxxxxxx.net ([xxx.xx.xxx.xxx) by xxxxxxxx.na.xxxxxxxxxx.net with Microsoft SMTPSVC(6.0.3790.3959);
                 Mon, 16 Jun 2008 09:16:33 -0400
Received: from xxxxxxxx.xxxxxxxx.com ([xxx.xx.xxx.xxx]) by xxxxxxxx.na.xxxxxxxxxx.net with Microsoft SMTPSVC(6.0.3790.3959);
                 Mon, 16 Jun 2008 09:16:33 -0400
Received: from ([xxx.xx.xxx.xxx])
                by xxxxxxxx.xxxxxxxx.com with ESMTP  id 5502559.55808630;
                Mon, 16 Jun 2008 09:17:15 -0400
Received: from ([xxx.xx.xxx.xxx])
                by edgex.xxxxxxxx.net with ESMTP  id 5302078.EDGE;
                Mon, 16 Jun 2008 09:17:14 -0400
Received: from localhost ([xxx.xx.xxx.xxx]) by xxxxxxxx.xxxxxxxx.com with Microsoft SMTPSVC(6.0.3790.1830);
                 Mon, 16 Jun 2008 09:17:14 -0400
From: order@xxxxxxxx.com
To: xxx.xxxxxxxx@xxxxxxx.com
Subject: XX2951029-P001 - Purchasing request for Requestor John Doe
Date: Mon, 16 Jun 2008 09:17:14 -0400
MIME-Version: 1.0
Content-Type: Multipart/Mixed;
Return-Path: order@xxxxxxxxx.com
Message-ID: <XXXXXXXXXXXXXX1R0rmTI000027a9@xxxxxxxxx.xxxxxxxxx.com>
X-OriginalArrivalTime: 16 Jun 2008 13:17:14.0522 (UTC) FILETIME=[4B0BCFA0:01C8CFB3]

Content-Type: text/Plain; charset="US-ASCII"
Content-Transfer-Encoding: Quoted-Printable

Content-Type: Application/Octet-stream;
Content-Transfer-Encoding: BASE64


Question by:sfletcher1959
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

manu4u earned 2000 total points
ID: 21863225
The application which creates the email , what is the MIME settings ? .. Did you try with UTF-8 ?

Author Comment

ID: 21874951
Okay, this is way out of my league, but let me see if I can help someone help me.  We are currently using a product called GhostScript to create our PDFs.  It appears to be using UTF-16 by default.  Can you look at the information off of the GhostScript site to see if you can lead me to how to change this to UTF-8.  
Here is the information from their site.  www.ghostscript.com:

Using Unicode True Type fonts
Ghostscript can handle True Type fonts with the full Unicode character set. For doing that, a 3d party software should generate a Postscript or PDF document with a text, which is encoded with the UTF-16 encoding. Ghostscript may be used for converting such Postscript documents to PDF and for re-distilling such PDF documents to PDF subsets.
To render an UTF-16 encoded text, one must do the following :

Provide a True Type font with Unicode Encoding. It must have a cmap table with platformID equals to 3 (Windows), and SpecificID eqials to 1 (Unicode).
Describe the font in lib/cidfmap with special values for the CSI key : [/Artifex /Unicode 0].
In the PS or PDF document combine the font with one of CMap Identity-UTF16-H (for the horizontal writing mode) or Identity-UTF16-V (for the vertical writing mode). Those CMaps are distributed with Ghostscript in Resource/CMap.
Please note that /Registry (Adobe) /Ordering (Identity) won't properly work for Unicode documents, especially for the searchability feature (see CID font substitution).

Author Closing Comment

ID: 31470391
Only answer to question.  Must be something that I need to speak with MFG support.  Thanks anyway.

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question