# SagMailGateway - Email Attachments not always visible

**URL:** <https://techcommunity.softwareag.com/t/sagmailgateway-email-attachments-not-always-visible/59258>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Service-Orchestrator\
**Created:** [April 18, 2005, 5:15pm UTC](https://techcommunity.softwareag.com/t/sagmailgateway-email-attachments-not-always-visible/59258 "2005-04-18T17:15:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Sanders](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@David\_Sanders](https://techcommunity.softwareag.com/u/David_Sanders)\
**Post date:** [April 18, 2005, 5:15pm UTC](https://techcommunity.softwareag.com/t/sagmailgateway-email-attachments-not-always-visible/59258/1 "2005-04-18T17:15:17Z")

</div>

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 [hotmail.com](http://hotmail.com) or [softwareag.co.uk](http://softwareag.co.uk) address

- Email received
- Attachments visible

Email to [yahoo.co.uk](http://yahoo.co.uk) 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 [softwareag.co.uk](http://softwareag.co.uk) 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 [softwareag.co.uk](http://softwareag.co.uk) 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)

---

<div class="post-metadata">

**Author:** ![Mike\_Bernat](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mike\_Bernat](https://techcommunity.softwareag.com/u/Mike_Bernat)\
**Post date:** [April 20, 2005, 11:09pm UTC](https://techcommunity.softwareag.com/t/sagmailgateway-email-attachments-not-always-visible/59258/2 "2005-04-20T23:09:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![David\_Sanders](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@David\_Sanders](https://techcommunity.softwareag.com/u/David_Sanders)\
**Post date:** [April 25, 2005, 10:31pm UTC](https://techcommunity.softwareag.com/t/sagmailgateway-email-attachments-not-always-visible/59258/3 "2005-04-25T22:31:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mike\_Bernat](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mike\_Bernat](https://techcommunity.softwareag.com/u/Mike_Bernat)\
**Post date:** [April 25, 2005, 10:44pm UTC](https://techcommunity.softwareag.com/t/sagmailgateway-email-attachments-not-always-visible/59258/4 "2005-04-25T22:44:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:39pm UTC](https://techcommunity.softwareag.com/t/sagmailgateway-email-attachments-not-always-visible/59258/5 "2021-04-02T14:39:44Z")

</div>

Closed on April 2, 2021, 2:39pm UTC


