SagMailGateway - Email Attachments not always visible

Calling all XML Mediators,

I am usingSagMailGateway to send emails that have pdf attachments. However, access to these emails seems to depend on the destination email address:

Email to or address

  • Email received
  • Attachments visible

Email to address

  • Email received
  • Attachments not visible
  • If I forward the email I see the attachments on the next page

Email to customer’s email address where GroupWise is used as the mail client

  • Email received
  • Attachments not visible
  • Attachments can however be accesses via the menu structute (File->Attachments->View)

Other testing

  • If email (with visible attachments) is forwarded from a to a yahoo or GroupWise address, the attachments are still not visible.
  • If i forward an email from a yahoo or GroupWise address to a address, the attachments are visible
  • Test emails with pdf attachments sent from MS Outlook are received with attachments by all email addresses

I have checked the generated email’s headers and the only discernible difference is the Content-Type property:

Generated Email Content-Type = multipart/mixed
Outlook Email Content-Type = multipart/related; type=“multipart/alternative”

Is this a known issue? Is there a property I can set to control the email, header info? Are there any work arounds?

David Sanders
Software AK (UK)

Hi David,

Unfortunately, there is considerable variation in the behavior of mail servers and mail-reading clients with respect to attachments. I do not believe there is any “perfect” setting that will display the same in all combinations.

Beyond the mail server and mail client programs themselves, some of the things that influence the behavior are:

  • the content-type of the complete message (multipart/related vs multipart/mixed)
  • the content-type of the individual attachments
  • whether “name=” is specified as part of the attachment’s content-type
  • whether the mail client has special processing or other programs associated with a particular content-type
  • the impact of mail server or mail client based virus or spam scanners.

Hope this helps.

Thanks Mike,

The name attribute of the attachments are being set in the mediator sequence, so I guess the content type of the overall message is at fault. This is being generated by SagMailGateway as multipart/mixed whereas that of an outlook generated message (with attachments visible) is set to multipart/related. Is there a way to set this proprty in a mediator sequence?

Kind regards,
David Sanders

Hi David,

In looking at the code, the multipart content type is determined by the setting of the xbd.mail.body property. If the property is present and its value is “no”, then the content-type is multipart/mixed. Otherwise it is multipart/related.

I do not see any other way to influence the multipart content-type.

Hope this helps.