hello there,
While building the MIME message(using the mail API) for SOAP 1.2 to use with
Mail Transport, I encountered the following problem.

In the specification for Mail
Transport([1]<http://people.apache.org/%7Epzf/SMTPBase64Binding-0.2.html>)
it is said that the MIME message should be a multi part MIME message where
the content of the  first part is empty. It is not a MUST but RECOMMENDED to
that this part has not content(Please refer section 2.1 at
[1]<http://people.apache.org/%7Epzf/SMTPBase64Binding-0.2.html>
).

So when trying to build a MIME message with the API it gave the following
result.

1. First I built a multi part MIME message


From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Anything
X-Service-Path: "/my/service/urlpath"
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary=-------6b8b462f327b248e6b8b462f327b248e


This is a multi-part message in MIME format

---------6b8b462f327b248e6b8b462f327b248e
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

empty
---------6b8b462f327b248e6b8b462f327b248e
Content-Type: application/soap+xml
Content-Description: test.xml
Content-Transfer-Encoding: base64

PHNvYXBlbnY6RW52ZWxvcGUKeG1sbnM6c29hcGVudj0iaHR0cDovL3NjaGVtYXMueG1sc29h
cC5vcmcvc29hcC9lbnZlbG9wZS8iPjxzb2FwZW52OkhlYWRlci8+PHNvYXBlbnY6Qm9keT48
bnMxOmVjaG9TdHJpbmcKeG1sbnM6bnMxPSJodHRwOi8vd3MuYXBhY2hlLm9yZy9heGlzMi9j
L3NhbXBsZXMiPjx0ZXh0PkhlbGxvCldvcmxkITwvdGV4dD48L25zMTplY2hvU3RyaW5nPjwv
c29hcGVudjpCb2R5Pjwvc29hcGVudjpFbnZlbG9wZT4K

---------6b8b462f327b248e6b8b462f327b248e--


2. Then I built a MIME message with the first part empty which gave the
following mime message.

From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Anything
X-Service-Path: "/my/service/urlpath"
MIME-Version: 1.0
Content-Type: application/soap+xml
Content-Description: test.xml
Content-Transfer-Encoding: base64

PHNvYXBlbnY6RW52ZWxvcGUKeG1sbnM6c29hcGVudj0iaHR0cDovL3NjaGVtYXMueG1sc29h
cC5vcmcvc29hcC9lbnZlbG9wZS8iPjxzb2FwZW52OkhlYWRlci8+PHNvYXBlbnY6Qm9keT48
bnMxOmVjaG9TdHJpbmcKeG1sbnM6bnMxPSJodHRwOi8vd3MuYXBhY2hlLm9yZy9heGlzMi9j
L3NhbXBsZXMiPjx0ZXh0PkhlbGxvCldvcmxkITwvdGV4dD48L25zMTplY2hvU3RyaW5nPjwv
c29hcGVudjpCb2R5Pjwvc29hcGVudjpFbnZlbG9wZT4K

So according to this the API ignores the first part if it has not any
content. So is it okay to use the first(1)  MIME message since the spec.
described that it is not a MUST that the content should be empty but it is
RECOMMENDED?


Thank you,
Best regards,
Rajika


[1] -  http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html

Reply via email to