Send any kind of attachments via pub.client:smtp service


I’d like to send any kind of attachments via pub.client:smtp service. I work with:

  • Ms Outlook 2003 as an SMTP Client
  • IS Version is 6.5
  • JVM version is 1.4.2

According to WM documentation, if I use filename to attach a file to the message and the file is not a plain text file, I must set the contenttype and encoding. For .doc files, the values are:
- contenttype: application/mssword
- encoding: base64

For .xls, .ppt, .pdf, .rar, .zip files even pictures, what are the values of contenttypeand encoding?[/size]

The encoding value will depend on what your service does, if anything, to encode the file. The content types can be looked up on the web. For example, PDF is application/pdf.

Here are content type values for all kind of files

The content type value “application/octet-stream” handle any e-mail attachment!

True, but this should be used only when the content type is not known or cannot be determined. application/octet-stream basically says “here’s a bunch of bits–you figure it out.”