cancel
Showing results for 
Search instead for 
Did you mean: 

Problem sending Mail from PO 7.5 with startTLS and attachment

petra_writz
Participant
0 Kudos
1,957

Hello,

we use a PO 7.5 with SPS 18 and up-to-date Patches for the components.

We created a receiver mail channel with SMTP and XIPAYLOAD. We set the URL für the receiving SAP ERP System:

smtp://<host FQDN>:25, keep attachement is checked and under advanced tab the parameter startTLS = true.

When we send an email, this is shown in our ERP system, but the attached pdf is corrupt. It looks like an xml attachment:

%PDF-1.6
%âãÏÓ
1 0 obj
<< /AcroForm 54 0 R/MarkInfo<</Marked true>>/Metadata 2 0 R/Names 55 0 R/Pages 278 0 R/Type/Catalog/Perms 276 0 R/StructTreeRoot 286 0 R/NeedsRendering true>>
endobj
2 0 obj
<< /Length 4997/Subtype/XML/Type/Metadata>>stream
< ?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
< x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.4-c005 78.150055, 2013/08/07-22:58:47 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmlns:pdf="http://ns.adobe.com/pdf/1.3/"
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:desc="http://ns.adobe.com/xfa/promoted-desc/">
<xmp:MetadataDate>2020-06-09T10:32:02+02:00</xmp:MetadataDate>
<xmp:CreatorTool>Adobe LiveCycle Designer 11.0</xmp:CreatorTool>
<xmp:ModifyDate>2020-06-09T10:32:02+02:00</xmp:ModifyDate>
<xmp:CreateDate>2020-06-09T10:32:02+02:00</xmp:CreateDate>
<pdf:Producer>Adobe XML Form Module Library</pdf:Producer>
<xmpMM:DocumentID>uuid:268aab05-2949-4971-96dc-c97ca1478c76</xmpMM:DocumentID>
<xmpMM:InstanceID>uuid:01c9b73c-393c-4236-b874-1649e63d041d</xmpMM:InstanceID>
<dc:format>application/pdf</dc:format>
<dc:date>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<rdf:value>Jan2009</rdf:value>
<dc:element-refinement>dc:created</dc:element-refinement>
</rdf:li>
</rdf:Seq>
</dc:date>
<dc:creator>
<rdf:Seq>
<rdf:li>I038267</rdf:li>
</rdf:Seq>
</dc:creator>
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">Offline bidding form</rdf:li>
</rdf:Alt>
</dc:title>
<desc:contact rdf:parseType="Resource">
<rdf:value>Pakhee Gupta</rdf:value>
<desc:ref>/template/subform[1]</desc:ref>
</desc:contact>
<desc:department rdf:parseType="Resource">
<rdf:value>SRM</rdf:value>
<desc:ref>/template/subform[1]</desc:ref>
</desc:department>
<desc:version rdf:parseType="Resource">
<rdf:value>1</rdf:value>
<desc:ref>/template/subform[1]</desc:ref>
</desc:version>
<desc:embeddedHref rdf:parseType="Resource">
<rdf:value>C:\Users\D061611\Desktop\ZSRM_LOGO_FHH.BMP</rdf:value>
<desc:ref>/template/subform[1]/pageSet[1]/pageArea[1]/subform[1]/draw[2]</desc:ref>
</desc:embeddedHref>
<desc:Schema_Annotation rdf:parseType="Resource">
<rdf:value rdf:resource="data:;base64,QWRkcmVzcyBOb2RlIEFERFJFU1MgCiBBRERSRVNTLU5VTUJFUi1GSUVMRCA9IElWX0JJRERFUi1B RERSX05P"/>
<desc:contentType>text/plain</desc:contentType>
<desc:ref>/template/subform[1]/pageSet[1]/pageArea[1]/subform[2]/subform[1]/field[1]</desc:ref>
</desc:Schema_Annotation>
</rdf:Description>
</rdf:RDF>
< /x:xmpmeta>

We tried to download this file to open woth Acrobat Reader, but this doesn't work, unable to open this file.

After that we used the new parameter splitMainPayload from note 2863754 (we do have the nessary

patch level).

Now the mail stucks in PO and we see in monitoring the following error:




Mail: Error occurred: com.sap.aii.af.sdk.xi.lang.BinaryIndexOutOfBoundsException: Binary index out of range: -1

Mail: Error occurred: com.sap.aii.af.lib.mp.module.ModuleException

MP: exception caught with cause com.sap.aii.af.sdk.xi.srt.BubbleException: Failed to call the endpoint [null "null"]; nested exception caused by: com.sap.aii.af.sdk.xi.srt.BubbleException: Failed to call the endpoint [null "null"]; nested exception caused by: com.sap.aii.af.sdk.xi.lang.BinaryIndexOutOfBoundsException: Binary index out of range: -1

Has anybody an idea whats the matter?

Without startTLS the mail and attachment reach correct the ERP system. But we do have to encrypt the mails.

Best regards

Petra

Accepted Solutions (0)

Answers (4)

Answers (4)

rfunke68
Explorer
0 Kudos

Hi Willian,

kindly contact SAP directly and ask whether the Note can be applied to SP20 in the same fashion as to SP19.

I'm attaching a sample payload. However, the BASE64-coded attachment has been made invalid.

You have to use "splitMainPayload" = true as per SAP note.

Regards, Rene

former_member713563
Discoverer
0 Kudos

Hi Rene,

Thank you very much for your explanation.

I have contacted SAP and they uploaded the SAP Note 3014315 for the SP20 PL4 with the correction.

Regards,

Willian

rfunke68
Explorer
0 Kudos

Hi Willian,

yes, the problem was fixed. However, I am not certain that your problem describes exactly the same problem that we had.

Anyway, here is what we did:

1. Make sure that the boundaries of the email to be sent are correctly set.

2. Apply SAP note https://launchpad.support.sap.com/#notes/3014315 to your PO-System

3. Set both module parameters splitMainPayload = "true" and startTLS = "true", just as you've described yourself.

Hope that helps.

Regards,

Rene

former_member713563
Discoverer
0 Kudos

Hi Rene,

Thank you very much for the answer.

Do you know if is necessary to apply SP 19 as mentioned in SAP Note 3014315? Because the basis team applied de SP 20 of the Software Component MESSAGING.

Could you send me your payload with boundaries? I don´t know if I need close boundaries in my Message Mapping.

When I see the trace in XPI_INSPECTOR throw message: "Mail: Error occurred: java.lang.ArrayIndexOutOfBoundsException: while trying to store to index 10 of an object array with length 10, loaded from local variable stringArray".

I guess that is trying to read the next payload content.

If I don´t use "splitMainPayload" = true, the email is arriving at the destination but all message is in the body.

Regards,

Willian

rfunke68
Explorer
0 Kudos

Hi Petra,

I am currently in contact with the responsible SAP developers via SAP support . A prelimenary correction has been made available to us. Should our testing proof to be successful, I'll advise accordingly.

Regards, Rene

former_member713563
Discoverer
0 Kudos

Hi Hene,

Did fix your problem?

I have the same problem, however, I am using splitMainPayload = "true" and startTLS = "true" in the Module tab in standard module key "mail".

If I send a text (body) and attachment at the same time, throwing the message: "Mail: Error occurred: java.lang.ArrayIndexOutOfBoundsException: while trying to store to index 10 of an object array with length 10, loaded from local variable stringArray".

If I send only the attachment, the mail is sent to the destination, however, the attachment (XML) is sent as an attachment into another email to the destination.

Regards,

Willian

rfunke68
Explorer
0 Kudos

Hi Petra,

we are sitting with exactly the same problem.

There are 2 differences though. For one, we are on SPS19, PL1 as per SAP note https://launchpad.support.sap.com/#notes/2863754. There should not be a problem if you are on SPS18 with the correct PL-level.

Secondly, we don't get an error when using parameter splitMainPayload. The email is sent and received. However, the expected text in the body of the email is received correctly. The attachment however is missing.

Have you found a way to resolve the problem?

Thanx a mil.

Rene

petra_writz
Participant
0 Kudos

Hi René,

no, we didn't find a solution until now. In december we opened a ticket. SAP analyzed some logs we provided, but without any suggestion for a solution.

Best regards

Petra