Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

How send e-mail with XML + PDF and body text

$
0
0

Hi everyone,

 

I have a new requirement but I´m with doubts, how to send an e-mail with two attachements (XML and PDF) and body text using -

 

MIME: multipart/mixed;boundary

 

I already have code to send XML + body text as you can see below:

 

Element contentType = docout.createElement("Content_Type");  root.appendChild(contentType);  Text contentTypeText = docout.createTextNode("multipart/mixed;boundary=--AaZz");  absTraceLog.addDebugMessage("Content_Type e-mail --- "+contentTypeText.toString());  contentType.appendChild(contentTypeText)
String text = "----AaZz\r\nContent-Type: text/plain; charset=UTF-8\r\n" +        "Content-Disposition: inline\r\n\r\n" + nfeText +        "\r\n----AaZz\r\nContent-Disposition: attachment; filename="+ prefixo +" "+ chaveNFe +".xml" +"\r\n\r\n" + xmlString + "\r\n";
Element content = docout.createElement("Content");
root.appendChild(content);
contentText = docout.createTextNode(text); 
Content.appendChild(contentText);

The code above work good, but I can´t duplicate any field from XiMail 3.0 - because it´s 0:1.

 

Capturar.PNG

So how to do that ?

 

Thanks.

 

Regards,

 

BR.

 

Viana.


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>