Welcome! Log In Create A New Profile

Advanced

PDF as attachment to an email

Posted by Stefan Bentvelsen 
Stefan Bentvelsen
PDF as attachment to an email
December 09, 2008 03:12PM
In our software we made the possibility to send the output of (self programmed) reports as pdf-file to an email address. Most of the time this works OK, but some clients have problems with that regularly (notall times). The email is then send with the attachment in the text like the next example.

Anyone who know the reason, or more important how to solve this ?

Regards,

Stefan.


REPLY-TO: xxxxxxx@orange.nl
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="XWDBoundary_HTML_-1873463460"
Content-Transfer-Encoding: 8bit
DATE: Tue, 9 Dec 2008 14:59:55 +0200

Ceci est un message au format MIME en plusieurs parties.

--XWDBoundary_HTML_-1873463460
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: 7bit


--XWDBoundary_HTML_-1873463460
Content-Type: application/octet-stream;
name="Bestand.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="Bestand.pdf"


JVBERi0xLjMKJeTjz9IKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jl
c291cmNlcyAyIDAgUgovTWVkaWFCb3ggWzAgMCA4NDEuODkgNTk1LjI4XQovQ3JvcEJveCBb
MCAwIDg0MS44OSA1OTUuMjhdCi9Db250ZW50cyA0IDAgUgo+PgplbmRvYmoKNCAwIG9iago8
PC9GaWx0ZXIgL0ZsYXRlRGVjb2RlIC9MZW5ndGggMzI1MT4+CnN0cmVhbQ0KeJztXVuP3bYR
fs+v0EuRLNDIul/yljSJk6ZFimbRPNv12m26dorEiYH++ori8FD8DjUrakWencU+2AZ9dJmP
c/k4vIyq7M9ZkRdF9iErsufTnzfZF9fZs6/LbMyuX2dfXX+kfqX/rpoxb4asLYZ8GLLrV9kn
3199nHX52E03qubbqTnkRUPNX6dma5v/dJv/mpttRc1fpmatHq+b/56alf31J7f5+9Rs8rHy

... and much more rubbish like this ...
Stefan Bentvelsen
Re: PDF as attachment to an email
December 11, 2008 08:46AM
Anyone ?
Fabrice Harari
Re: PDF as attachment to an email
December 11, 2008 11:39AM
Hi Stephan...

is that something coming from the sender or how the receiver saw it?

I ask that question because if you look at any email SOURCE when you receive an attached pDF, that's exactly how it looks like... You just have your email client set up to show you the pretty version, with the file attached, but the file in question came through as a part of a multipart mime message...

To check it out, just take any email with a pdf, and look at it's source (generally on the view menu, item source)

best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile consulting
Stefan Bentvelsen
Re: PDF as attachment to an email
December 11, 2008 12:24PM
Quote
Fabrice Harari
Hi Stephan...

is that something coming from the sender or how the receiver saw it?

I ask that question because if you look at any email SOURCE when you receive an attached pDF, that's exactly how it looks like... You just have your email client set up to show you the pretty version, with the file attached, but the file in question came through as a part of a multipart mime message...

To check it out, just take any email with a pdf, and look at it's source (generally on the view menu, item source)

best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile consulting

Hi Fabrice,

thanks for your response. The email is how the receiver saw it, but not always and that makes it more difficult. Sometimes the receiver got a normal email with the pdf-file attached to it, sometimes he/she got an email like the example. May be you are right and is the email send like that (sometimes). In any case, the email is send from within our software via WinDev emailXXX statements.

I will take a look at the source of any email with pdf and let you know the result.
Alexandre Leclerc
Re: PDF as attachment to an email
December 11, 2008 05:08PM
Hi Stefan,

As Fabrice said, this looks like the email source "code". I would ask the receiver to send you the received e-mail original source and also one that was ok and compare both.

Ask for the .eml source file. (Save the email as a file in a folder.) Then attach the .eml to a email that will be sent to you. Then compare both.

Maybe there is something missing or different. But all looks ok. Maybe this is a problem with the mail client of your customer. You can try yourself o open the .eml with your own mail client.

Good luck.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: