[Gambas-user] PDF file sent by gb.net.smtp

Leonardo Miliani leonardo at ...1237...
Sat Apr 19 11:45:50 CEST 2008


Leonardo Miliani ha scritto:
> Leonardo Miliani ha scritto:
>> Leonardo Miliani ha scritto:
>>> Benoit Minisini ha scritto:
>>>> The first argument is the data, not the file path. You must write:
>>>>
>>>> PostService.Add(File.Load(FileChooser1.SelectedPath), "application/pdf", "document.pdf")
>>> I misunderstood the online help.... I'll try you suggestion.
>>>
>> It doesn't work!
>> I still continue to receive an empty document whose Mimetype is
>> text/plain instead of application/pdf.
>>
>> The strange things are that my test applications runs for several
>> seconds, as if it was sending the file and Thunderbird seems to download
>> a big file, as it it had arrived without problems. But when I go to open
>> the attachment I find the empty file.
>> Any suggestions?
>>
> 
> Maybe I've found the problem. I've saved the email and opened it with a
> Text editor.
> Here is what I've found in it:
> 
> "
> [cut]
> This is a MIME multipart message. Your mail reader isn't MIME capable.
> You might not be able to read parts or all of this message.
> 
> 
> 
> ------_=_libsmtp_Nextpart__000_000007DA.3B95D19_1
> Content-Type: text/plain; name="MIME part #0"; charset="utf-8"
> Content-Transfer-Encoding: quoted-printable
> 
> Prova
> 
> 
> 
> ------_=_libsmtp_Nextpart__000_000007DA.3B95D19_1
> Content-Type: application/postscript; name="stampa.ps"
> Content-Transfer-Encoding: base64
> JSFQUy1BZG9iZS0xLjAKJSVCb3VuZGluZ0JveDogMCAwIDU5NCA4NDIKJSVDcmVhdG9yOiBRdCAz
> LjMuNwolJUNyZWF0aW9uRGF0ZTogZ2lvIGFwciAxNyAxMjozNjoyOCAyMDA4CiUlT3JpZW50YXRp
> b246IFBvcnRyYWl0CiUlUGFnZXM6IDUKJSVEb2N1bWVudEZvbnRzOiBEZWphVnVTYW5zCgolJUVu
> ZENvbW1lbnRzCiUlQmVnaW5Qcm9sb2cKJSBQcm9sb2cgY29weXJpZ2h0IDE5OTQtMjAwNSBUcm9s
> bHRlY2guIFlvdSBtYXkgY29weSB0aGlzIHByb2xvZyBpbiBhbnkgd2F5CiUgdGhhdCBpcyBkaXJl
> Y3RseSByZWxhdGVkIHRvIHRoaXMgZG9jdW1lbnQuIEZvciBvdGhlciB1c2Ugb2YgdGhpcyBwcm9s
> [cut]"
> 
> You can see that the file has arrived as attachment but Thunderbird
> isn't capable to separate it from the message body....
> 

I've tried to open my test message via webmail and I've got the same
problems.
Looking at the email that I've included in my previous message I think
that it could be a bug in the gb.net.smtp component.
In fact I think that the method used to include the message body
(.Add()) isn't correct: it includes the message body as attachment.
So the mail readers are not able to distinguish between the 2 Mimetypes
(I think...).

-- 
Ciao.
Leo.

Web: www.leonardomiliani.com
E-mail: leonardo at ...1237...
Scegli software opensource - Choose opensource software

Co-fondatore di Gambas-it.org
Il sito di riferimento della comunità italiana degli utenti di Gambas
www.gambas-it.org




More information about the User mailing list