PSWinCom Gateway SMTP API

Modified on Thu, 01 Jun 2023 23:14 by FM — Categorized as: Gateway

SMTP interface is NOT intended for Bulk sending. This is a low throughput interface intended for use with single low volume messaging.
Please refer to XML API for High volume Bulk sending.

Interfaces of the PSWinCom SMS Gateway. The Gateway supports three main ways of using SMTP to submit SMS messages:


All three ways are described in detail in this document.

Mail (SMTP) is the preferred interface when the client is behind a firewall or without a direct connection to internet. As long as a mail system is present and operative, it is possible to submit messages to the SMS Gateway without installing any additional software or modifications of firewall settings.




Gateway connect information

Routed mail interface:
Simple mail interface:
XML mail interface:
Account web:https://accountweb.pswin.com
Product web:https://www.linkmobility.com
Support inquiries:

Overview

Below is a matrix showing how the three mail-interfaces works according to various functional requirements you or your software may have.

Requirement Routed Simple XML Note
Support for binary messages
Specify sender-Id for each message
No set-up on the account web
Group messages
Username/password not needed to send Depends on settings for Simple mail interface.
Receipt/confirmation required
Suitable for email to SMS forwarding

Routed mail interface

The routed mail interface is a very simple way of sending SMS messages from any mail software.

Configuration



When SMTP is enabled on your account, you must enable the mailaddresses you will allow to send messages. This can be done by logging onto the account web: https://accountweb.pswin.com. On the menu, select the “Mail Settings” link.

Trusted senders

You can specify any number of email-addresses and/or mail-domains that are trusted to send SMS messages using your account.

Note: Do not allow sending from any more addresses and/or domains than you strictly need. If you’re using a public available ISP such as hotmail.com, yahoo.com and others, you should only allow sending from particular addresses and not the whole domain.

Sender-Id

Sender-Id can be a number or a text of up to 11 characters (no special characters allowed). The sender-Id should be a valid international number (without the “+”plus prefix) if you like the receiver to be able to reply directly.

Default Prefix

A Default Prefix can be specified if you would like the SMS Gateway to always add your country-code to the receiver number. Normally you should set this to the country-code of your own country. The default prefix can be overridden by simply sending to a fully prefixed international number. For example: +4792123456@pswin.com will override a default prefix of “46”. The “+” (plus) sign is in this case will be ignored.

For security reasons, your account can be set up with a fixed mail address that will receive notification of each message processed by the SMS Gateway. This feature can be used to keep track of the SMS usage.

Sending messages

Receivers and group messages

To send messages, you must first go to Accountweb and add your sender address to the allowed sender list.

Receiver must follow the following format:


You can specify any number of receivers, and you can also use the CC and BCC fields to specify receivers just as with ordinary email. You can also send to groups by creating distribution lists in your mail software and put the SMS-addresses into the list.

Message text

Put your message in the subject field and/or message body. The message will contain subject and beginning of message body up to 160 characters in total.

A sample screenshot:

Image


Delivery and receipt

When you send the mail-message, it will be processed immediately upon reception of the Gateway. After processing, the message will be delivered on your phone within seconds.

If the sender would like to receive a receipt, one can choose the “Request Read Receipt” or similar option in the mail-software to request a receipt. The receipt will state the receiver, the message sent and a status of whether the message was successfully sent or not. Please note that this is not a handset-status but a confirmation that the message has been processed, verified and delivered to the SMS Gateway.

Simple mail interface

By using this interface it is possible to send plain text SMS to one or a few receivers by submitting a simple mail message to the PSWinCom SMS Gateway. There are no extended options or features.

The receiver number is placed as the Subject of the message. Must be specified including the international prefix, but without any leading “+” or “00”. At least 9 digits. Several numbers can be specified, separated with a single space character.

As with Routed mail, you must specify the email addresses you will be sending from.

The email body becomes the content of the SMS.

Limitation on sender name When using simple mail interface the sender number/name will be set to 'Mail'.

A sample screenshot:

Image

Notes:

Simple mail interface alternate method

This is an alternate method that allows you to specify the receivers in the body of the email. To specify a receivernumber, use the parameter "PSW_RECEIVERS=".
You can use a single number, or a custom variable from your system (e.g. %MobileNumber%).


Send to: sms2@pswin.com
Subject: Any numeric value of at least 8 digits. The subject field will get overwritten if 'PSW_RECEIVERS' exists in the email body.
Body:
PSW_RECEIVERS=4798765432
SMS Text here

Image

XML based mail interface

The XML based mail interface is intended for automated use from within applications and not for direct use from your mail-client. This is due to that the message body is an XML document containing detailed and specific information about the message(s) to send. The XML document must be valid and formatted according to the specifications given in the XML Interface documentation.

Using this XML-based interface you have full control of the messagedata you send, and it allows you to submit binary messages such as ringtones and logos as well.

Consider the following XML document containing two text message:

<?xml version="1.0"?>
<!DOCTYPE SESSION SYSTEM "pswincom_submit.dtd">
<SESSION>
  <CLIENT>demo</CLIENT>
  <PW>password</PW>
  <MSGLST>
    <MSG>
      <SND>Sender ID</SND>
      <TEXT>Test message1</TEXT>
      <RCV>4793000000</RCV>
    </MSG>
    <MSG>
      <SND>Sender ID</SND>
      <TEXT>Test message2</TEXT>
      <RCV>4793000000</RCV>
    </MSG>
  </MSGLST>
</SESSION>

To send these two messages using the XML mail interface, simply create a new mail and insert the above XML into the mail body. Remember to replace username/password and receivernumber with suitable values. Send the mail to sms@pswin.com and it will be parsed and consumed by the SMS Gateway.

Please refer to the XML Interface documentation to see all fields allowed in the XML sent to this interface.

A sample screenshot:

Image

You do not need to fill out the Subject field, as it is not used for any purpose when using the XML-based mail interface.

Please note that you will not receive any response back, regardless of whether the message was successfully delivered or not.

Receive MO

See: Receive MO messages over SMTP