以编程方式发送时如何订购多部分彩信的部分

How to order parts of mutlipart mms when sending programmaticaly

我无法按我想要的方式订购部分彩信。问题是文本总是在 iamges 之后,但我不想要这个。我尝试了内容类型参数级别,但没有结果。事实上,我不知道它的作用是什么,因为我在 wap 文档中找不到关于大多数参数的任何内容。有没有办法订购 body 零件?谢谢。

看来你可以试试这个:

SOAP attachment : multipart /related 
-----part 1 
-----multipart/mixed 
    -------------part 1 
    -------------part 2 
    -------------part 3

内部 MIME 部分可以是 multipart/mixed 或 multipart/related。
如果存在 SMIL 表示,则使用 Multipart/related。
如果不存在 SMIL 表示,则使用 Multipart/mixed。

See 6.4

部分

我还遇到了一些更具体的 examples NowSMS(聚合器应该无关紧要)的礼貌 - 但请记住,看起来 MMSC 也必须支持它。

The “Content-type:” header in the POST should be one of the “multipart” types (usually “multipart/related”), and should include a “boundary=” parameter that delimits the different parts of the message.

The first part of the multipart message is expected to be the XML for the MM7 request, and we’re going to expect to see a section with at least one , or recipient specified.

The second part of the multipart message is expected to be the content for the MMS message, and this in turn will usually be another MIME multipart structure.

The following example is adapted from the official MM7 specification that is included in the 3GPP TS 23.140 specification:

Note that this example does not include a SMIL file, and as part of the MMS content, you would probably want to include a SMIL file (application/smil), which this example does not include.

Also note that the MM7 XML portion of the document (the first part of the main multipart content) should not use any Content-Transfer-Encoding, it should always be expressed without any encoding. For the portion of the document that includes the MMS content itself, you can use Content-Transfer-Encoding of either quoted-printable or base64, or no encoding can be specified in which case it is assumed that the binary data is to be included as is.

他们的例子是(很抱歉 XML 格式不正确):

POST /mm7 HTTP/1.1
Host: mms.omms.com
Content-Type: multipart/related; boundary=”NextPart_000_0028_01C19839.84698430″; type=text/xml; start=”</tnn-200102/mm7-submit>”
Content-Length: nnnn
SOAPAction: “”

–NextPart_000_0028_01C19839.84698430
Content-Type:text/xml; charset=”utf-8″
Content-ID: </tnn-200102/mm7-submit>

<?xml version=”1.0″ ?>
<env:Envelope xmlns:env=”http://schemas.xmlsoap.org/soap/envelope/”>
<env:Header>
<mm7:TransactionID xmlns:mm7=”http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-M M7-1-3″ env:mustUnderstand=”1″>
vas00001-sub
</mm7:TransactionID>
</env:Header>
<env:Body>
<SubmitReq xmlns=”http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3″>
<MM7Version>5.6.0</MM7Version>
<SenderIdentification>
<VASPID>TNN</VASPID>
<VASID>News</VASID>
</SenderIdentification>
<Recipients>
<To>
<Number>7255441234</Number>
</To>
<Cc>
<Number>7255443333</Number>
</Cc>
<Bcc>
<RFC2822Address>7255444444@OMMS.com</RFC2822Address>
</Bcc>
</Recipients>
<ServiceCode>gold-sp33-im42</ServiceCode>
<LinkedID>mms00016666</LinkedID>
<MessageClass>Informational</MessageClass>
<TimeStamp>2002-01-02T09:30:47-05:00</TimeStamp>
<EarliestDeliveryTime>2002-01-02T09:30:47-05:00</EarliestDeliveryTime>
<ExpiryDate>P90D</ExpiryDate>
<DeliveryReport>true</DeliveryReport>
<Priority>Normal</Priority>
<Subject>News for today</Subject>
<ChargedParty>Sender</ChargedParty>
<DistributionIndicator>true</DistributionIndicator>
<Content href=”cid:SaturnPics-01020930@news.tnn.com” allowAdaptations=”true”/>
</SubmitReq>
</env:Body>
</env:Envelope>
–NextPart_000_0028_01C19839.84698430
Content-Type: multipart/mixed; boundary=”StoryParts-74526-8432-2002-77645″
Content-ID:SaturnPics-01020930@news.tnn.com

–StoryParts-74526-8432-2002-77645
Content-Type: text/plain; charset=”us-ascii”

Science news, new Saturn pictures…
–StoryParts-74526-8432-2002-77645
Content-Type: image/gif
Content-ID:<saturn.gif>
Content-Transfer-Encoding: base64

R0lGODlhSAAcAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/
/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAA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aFGkDZUW/OnzZMqhRjdShWrzIsimNp8q
vKpypdmzGluebYpWKtmBFT+azUiX6M2zONty9Ig2JM++egMLFvw3YUS7Hf+uzDsYBd+Pj/fO5UuQ
WlynRecqbsy5McKekdcO7Py4tFzHgyuPTr26s2vCBQPnbW26cWizHjFrfnla7+bXgw/7vnwXN2rJ
RXHyrH28bc7MiD8jBh69d2C6JkFKfSkSde6BOQs+X/9efHHv5ccxFzb827pm6NpPuseqm6lCsV2p
1a7Ls3/b+60pRRVZPU1kFWD/bXeUUHDRVdVRSxWXkFSUfQWThSNlh8JW9GUUWoMxMchVWfThN+JD
KXHIm3z2IaWiQAEBADs=
–StoryParts 74526-8432-2002-77645–
–NextPart_000_0028_01C19839.84698430–

This is just a quick example of an MM7 connection to help you get started.

Note that in the above example, the binary data for the image has been base64 encoded. This is not necessary when submitting MMS messages to NowSMS using MM7. The standard 8-bit binary data can be included in the MIME object without encoding.