locked
Getting Attached filename as Attachment.* in Outlook 2016 RRS feed

  • Question

  • Hi All,

    I am trying to send mail on BizTalk interface by orchestration and set following stuff in orchestration.

    I am using multi part message to set mail body and attachment.

    EmailMessage.Attachement = RawString("Attachment Message");

    EmailMessage.Attachement(MIME.FileName)="FileName.csv";

    EmailMessage.Attachement(Microsoft.XLANGs.BaseTypes.ContentType) = "text/csv";

    EmailMessage(SMTP.Subject) = "Mail Subject";

    EmailMessage(SMTP.CC) = "Email CC" ;

    EmailMessage(SMTP.From) = "Email From";

    EmailMessage(SMTP.SMTPHost) = "Smtp Host";

    EmailMessage.Body= RawString("Body Messages");

    EmailMessage.Body(Microsoft.XLANGs.BaseTypes.ContentType) = "text/html";

    Port_Dynamic(Microsoft.XLANGs.BaseTypes.Address) = "ToMail";

    BizTalk Version: 2013

    I am able to get mail with attachment but issue is that when I am looking this mail on “Outlook 2016”, the attached file name is coming with “Attachment.*” .it’s not coming as I am assigning filename in orchestration. Apart from that when I am trying to save this in local drive (from outlook 2016) then file name looks proper.

    I don’t think so this issue outlook 2016 because when I am trying send mails through C# class library in BizTalk interface then attached file name looks proper on outlook.

    Please help if anybody have idea about this.

    Note: When I am looking same mail on outlook2013, no issue getting. All good with same.

    Thanks & Regards

    Satya

    Thursday, August 4, 2016 12:40 PM

Answers

  • Hi SStaya82,

    Sorry for not being clear, what I meant was that capture the message transmitted by Biztalk using a fiddler or just use an BizTalk application with POP3 adapter to capture the MIME message...


    Mandar Dharmadhikari

    Saturday, August 6, 2016 9:08 AM
    Moderator

All replies

  • Hi Satya,

    Try the following,

    Have you set the "content-disposition" field for your attachments section in the MailHeader,

    your expected header should look like

    content-type: application/octet-stream; name=SampleAttachment.zip
    content-transfer-encoding: base64
    content-disposition; filename=abc.csv

    In case it is not possible you can do the following.

    if(MIME.FileName="")

    filename = MIME.PartContentTypeSecondaryHeaderValue

    Regards,


    Mandar Dharmadhikari

    Thursday, August 4, 2016 1:16 PM
    Moderator
  • Hi Mandar,

    i am doing only these thing on mail message. are we need to add any thing else? Please assists 

    EmailMessage.Attachement = RawString("Attachment Message");

    EmailMessage.Attachement(MIME.FileName)="FileName.csv";

    EmailMessage.Attachement(Microsoft.XLANGs.BaseTypes.ContentType) = "text/csv";

    EmailMessage(SMTP.Subject) = "Mail Subject";

    EmailMessage(SMTP.CC) = "Email CC" ;

    EmailMessage(SMTP.From) = "Email From";

    EmailMessage(SMTP.SMTPHost) = "Smtp Host";

    EmailMessage.Body= RawString("Body Messages");

    EmailMessage.Body(Microsoft.XLANGs.BaseTypes.ContentType) = "text/html";

    Port_Dynamic(Microsoft.XLANGs.BaseTypes.Address) = "ToMail";

    Thanks & Regards

    Satya

    Thursday, August 4, 2016 2:47 PM
  • Hi Satya,

    Can you share the context property for the mail message which is being sent out by the orchestration??

    Regards,


    Mandar Dharmadhikari


    Thursday, August 4, 2016 3:07 PM
    Moderator
  • Hi Mandar,

    Below are the context properties details.

    <ContextInfo PropertiesCount="16">
        <ArrayProperty Name="PartNames" Namespace="schemas.microsoft.com/BizTalk/2003/messageagent-properties">
          <ArrayElement1 Value="Body" />
          <ArrayElement2 Value="Attachement" />
        </ArrayProperty>
        <Property Name="PartyName" Namespace="schemas.microsoft.com/BizTalk/2003/messagetracking-properties" Value="" />
        <Property Name="CC" Namespace="schemas.microsoft.com/BizTalk/2003/smtp-properties" Value="xyz" />
        <Property Name="From" Namespace="schemas.microsoft.com/BizTalk/2003/smtp-properties" Value="xyz" />
        <Property Name="SMTPHost" Namespace="schemas.microsoft.com/BizTalk/2003/smtp-properties" Value="xyz" />
        <Property Name="Subject" Namespace="schemas.microsoft.com/BizTalk/2003/smtp-properties" Value="xyz" />
        <Property Name="OutboundTransportCLSID" Namespace="schemas.microsoft.com/BizTalk/2003/system-properties" Value="{guid}" />
        <Property Name="OutboundTransportLocation" Namespace="schemas.microsoft.com/BizTalk/2003/system-properties" Value="mailto" />
        <Property Name="SPID" Namespace="schemas.microsoft.com/BizTalk/2003/system-properties" Value="{guid}" />
        <Property Name="InterchangeID" Namespace="schemas.microsoft.com/BizTalk/2003/system-properties" Value="{guid}" />
        <Property Name="MessageType" Namespace="schemas.microsoft.com/BizTalk/2003/system-properties" Value="" />
        <Property Name="Operation" Namespace="schemas.microsoft.com/BizTalk/2003/system-properties" Value="Operation" />
        <Property Name="OutboundTransportType" Namespace="schemas.microsoft.com/BizTalk/2003/system-properties" Value="SMTP" />
        <Property Name="SchemaStrongName" Namespace="schemas.microsoft.com/BizTalk/2003/system-properties" Value="" />
        <Property Name="SendingOrchestrationID" Namespace="schemas.microsoft.com/BizTalk/2003/xlangs-properties" Value="Guid" />
        <Property Name="SendingOrchestrationType" Namespace="schemas.microsoft.com/BizTalk/2003/xlangs-properties" Value="" />
      </ContextInfo>

    Thanks & Regards

    Satya

    Friday, August 5, 2016 12:10 PM
  • Hi SSatya82,

    Are you MiME encoding the message while sending out the mail??

    Regards,


    Mandar Dharmadhikari

    Friday, August 5, 2016 12:15 PM
    Moderator
  • Hi Mandar,

    Yes I have included "MIME" encoder at send pipeline.

    Thanks & Regards

    Satya

    Friday, August 5, 2016 12:26 PM
  • Hi SSatya,

    Share the context properties of the message after it is mine encoded.

    Regards,


    Mandar Dharmadhikari

    Friday, August 5, 2016 12:30 PM
    Moderator
  • HI Mandar,

    Above is the same context properties.

    Thanks & Regards

    Satya

    Friday, August 5, 2016 12:35 PM
  • Hi SStaya82,

    Sorry for not being clear, what I meant was that capture the message transmitted by Biztalk using a fiddler or just use an BizTalk application with POP3 adapter to capture the MIME message...


    Mandar Dharmadhikari

    Saturday, August 6, 2016 9:08 AM
    Moderator