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.
So how to do that ?
Thanks.
Regards,
BR.
Viana.