No one answered my first post, so I'll try again.
I am using Indy 9.0.11 (TIdSMTP and TIdMessage) to send emails.
It works fine except for one thing: Attachments with non-US letters in the
filename.
If I send a mail with a filename containing danish letters such as "???.jpg"
then the filename in the mail becomes fubar.
The attachment itself is ok but the filename is trashed.
The strange thing is that it depends on the SMTP server that I use.
I use the exact same program written in Delphi 5 and using Indy 9.0.11 and
send the exact same file attached.
If I send the mail through my company's smtp server then the filename is
unharmed and ok.
If I send the mail through my private ISP's smtp server then the filename is
trashed.
This happens consistently.
The SMTP served used is the only difference.
It doesn't matter which program I use to receive the mail:
I have tried using Lotus Notes, Outlook Express and Indy TIdPOP3 to recieve
the mail.
This is driving me absolutely bonkers.
My question is simply:
How do I ensure that the filenames of attached files are written correctly
in the message,
nomatter which SMTP server I or my customers happens to use?
Further information:
When I look at the mail text it contains these linies:
Using Indy, sent through my company's SMTP server:
(non-US letters in filename, all is fine)
- - = _ NextPart_2rfkindysadvnqw3nerasdf
C ontent-Type: application/octet-stream; name="???.jpg";
name="???.jpg"
C ontent-Transfer-Encoding: base64
C ontent-Disposition: attachment; filename="???.jpg";
filename="???.jpg"
Using Indy, sent through my private ISP's SMTP server:
(notice the non-US letters are removed from the filename???)
- - = _ NextPart_2rfkindysadvnqw3nerasdf
C ontent-Type: application/octet-stream; name=".jpg";
name=".jpg"
C ontent-Transfer-Encoding: base64
C ontent-Disposition: attachment; filename=".jpg";
filename=".jpg"
Using Outlook Express, sent through my private ISP's SMTP server:
(non-US letters in filename, all is fine)
- - = _ NextPart_2rfkindysadvnqw3nerasdf
C ontent-Type: image/jpeg; name="=?Windows-1252?B?5vjlLmpwZw==?=";
name="???.jpg"
C ontent-Transfer-Encoding: base64
C ontent-Disposition: attachment;
filename="=?Windows-1252?B?5vjlLmpwZw==?=";
filename="???.jpg"
Using Outlook Express, sent through my private ISP's SMTP server:
(only US letters in filename, all is fine)
- - = _ NextPart_2rfkindysadvnqw3nerasdf
C ontent-Type: image/jpeg; name="tulips.jpg";
name="tulips.jpg"
C ontent-Transfer-Encoding: base64
C ontent-Disposition: attachment; filename="tulips.jpg";
filename="tulips.jpg"
(I inserted some blanks in the lines above otherwisw OE wouldn't send it)
Please help me.
--
Finn Tolderlund