Sun Java System Messaging Server 6 2005Q4 Administration Guide

The Email to SMS Conversion Process

In order for email to be sent to a remote site, email must be converted to SMS messages that can be understood by the remote SMSCs. This section describes the process of converting an email message queued to the SMS channel to one or more SMS messages. As described below, options allow control over the maximum number of SMS messages generated, the maximum total length of those SMS messages, and the maximum size of any single SMS message. Only text parts (that is, MIME text content types) from the email message are used and the maximum number of parts converted may also be controlled.

Character sets used in the email message’s header lines and text parts are all converted to Unicode and then converted to an appropriate SMS character set.

When there is no SMS_TEXT mapping table (see Site-defined Text Conversions) an email message queued to the SMS channel receives the processing illustrated in Figure D–2.

Figure D–2 SMS Channel Email Processing

Flowchart showing SMS channel email processing.

Figure D–3 SMS Channel Email Processing (continued)

Flowchart showing SMS channel email processing (continued).

The following steps correspond to the numbered boxes in Figure D–2:

  1. An empty output buffer is started. The character set used for the buffer is Unicode.

  2. The email message’s originator address is taken from one of the following five sources, shown in decreasing order of preference:


    1. Resent-from:
    2. From:
    3. Resent-sender:
    4. Sender:
    5. Envelope From:
    

    If the originator address is an empty string, then the value of the FROM_NONE channel option is instead appended to the buffer.

    If, however, the originator address is a non-empty string, then the result of processing the FROM_FORMAT channel option, and the value of the LINE_STOP channel option are appended to the output buffer.

    Note that the Resent-from: and Resent-sender: header lines are only considered if the USE_HEADER_RESENT option has the value 1. Otherwise, Resent- header lines are ignored.

  3. If a Subject: header line is not present or is empty, then the value of the SUBJECT_NONE option is appended to the output buffer.

    Otherwise, the result of processing the SUBJECT_FORMAT option, and the value of the LINE_STOP channel option are appended to the output buffer.

  4. If there are no text message parts, then the value of the NO_MESSAGE channel option is appended to the output buffer.

    If there are text message parts, then the value of the CONTENT_PREFIX channel option is appended to the output buffer.

    Non-text message parts are discarded.

  5. For each text part, while the MAX_MESSAGE_PARTS limit has not been reached, the text part is decoded to Unicode and appended to the buffer, along with the value of the LINE_STOP channel option.

  6. The resulting output buffer is then converted from Unicode to either the SMSC’s default character set or UCS2 (UTF-16). The SMSC’s default character set is specified with the SMSC_DEFAULT_CHARSET option.

  7. After being converted, it is then truncated to not exceed MAX_MESSAGE_SIZE bytes.

  8. The converted string from The Email to SMS Conversion Process is then broken into one or more SMS messages, no single SMS message longer than MAX_PAGE_SIZE bytes. At most, MAX_PAGES_PER_MESSAGE SMS messages will be generated.


    Note –

    As an email message may have multiple recipients, Step 6 through Step 8 may need to be done for each recipient address which makes use of the MAXLEN, MAXPAGES, or PAGELEN attributes described in “Directing Email to the Channel,” on page 4.


Sample Email Message Processing

For example, with the channel’s default settings, the email message:


From: John Doe 
To: 1234567@sms.siroe.com
Subject: Today’s meeting
Date: Fri, 26 March 2001 08:17

The staff meeting is at 14:30 today in the big conference room.

Would be converted to the SMS message:

jdoe@siroe.com (Today’s meeting) The staff meeting is at 14:30 today in the big conference room.

A different set of option settings, that follows:


CONTENT_PREFIX=Msg:
FROM_FORMAT=From:${pa}
SUBJECT_FORMAT=Subj:$s

would instead produce:

From:John Doe Subj:Today’s meeting Msg:The staff meeting is at 14:30 today in the big conference room.