Email Connection

Email connection allows you to send and receive email messages.

Email connection can send email messages in two ways:

Email connection receives messages by connecting to a POP3 email server.

The contents of this topic:

 

Sending emails

Email connection uses the outgoing message from the Outbox to compose the email message.

The sender and recipient email addresses are specified in the Sender and Recipient fields. You can use the following message parameters to compose the address: %MsgFrom%, %MsgTo%, %MsgText%, %MsgID% and %MsgHexID%. For example, you can use %MsgTo%@domain.com to create an email address which includes the phone number of the recipient.

You can either enter the email address only, or the name under double quotes followed by the email address under angle brackets. For example, this field can be either mike@domain.com or "Mike" <mike@domain.com>.

The text of the outgoing message may contain a number of parameters separated by vertical line ( | ). The meaning of the parameters depends on the selected Compose type setting which may be either Simple or Advanced.

When the Simple compose type is selected, the outgoing message should contain the subject of the email message as the first parameter, and the rest of the text of the outgoing message will be used as the text of the email message. Either subject or text or both may be overridden, in which case the overridden part will not be extracted from the text of the outgoing message.

For example, if a message from the Outbox contains the following text:

Your account balance | Balance: 120 credits

then an email messages would be sent with the subject line "Your account balance", and the text "Balance: 120 credits".

When the Advanced compose type is selected, the text of the outgoing message should conform to  the following syntaxes:

Template | Param1 | Param2 | ... | ParamN

The email connection will use the specified file as the template for the email message. Optional parameters param1, param2, ... and paramN will be used to replace all occurrences of %P1%, %P2%, ... and %PN% in the template file.

For example, if you have already prepared an email message and stored it in the template folder under the name balance.eml and that message contains the following text:

Your account balance is %P1% credits.

then you can send the account balance information by using the following text in the Outbox message:

balance.eml | 120

Note that the Template parameter may contain either relative or absolute path to the file. If the path is relative then the template folder setting is used to resolve the location of the file.

 

Receiving emails

SMS Studio connects to a POP3 server at regular time intervals to collect new email messages. Note that the collected email messages are removed from the server after reception.

Incoming email messages are then converted to incoming SMS messages by using the From, To and Text formats, which may contain the following text parameters:

SMS Studio tries to detect and extract the phone number from the incoming email message. The first array of at least 6 digits, optionally preceded by the international prefix ( + ) and separated by white spaces, dashes ( - ), slashes ( / ), dots ( . ) or parentheses, is considered as a valid phone number.

For example, if you use put %Phone% to From format and %Text% to Text format, then you can receive emails with a phone number in the subject line. If an email message like this arrives:

Subject: My phone number is +12 (34) 56-789
Text: It's simply great that I can chat by using email!

SMS Studio will place a new message in the Inbox, which would appear as if it was sent from the phone number +123456789, containing the text It's simply great that I can chat by using email! By using this technique, you can even send back an SMS message to the sender as a reply to his email.

 

Email Connection Dialog

See Connection Dialog for description of the Connection, Account and Options tabs.

Login tab

Receive tab

Send tab

Compose tab

Related samples

How to Send Attractive Emails Using Email Templates

 

Copyright © 2002-2010 CodeSegment. All rights reserved.

   www.codesegment.com