ASPSMS_XML VBScript Class Model

Property Description
PasswordFileLocation

If you don't want to place your Username and Passwort directly in the ASP-Code, you have the possibility to retrieve the information out of a local file.

Usage

SMS.PasswordfileLocation = "C:/Programs/aspsms/mypasswordfile.txt"

The content of the passwordfile has to be specified in the following format:

Userkey = XXXXXXXXXXXX
Password = XXXXXX
Userkey

Used to identify your ASPSMS account.

You can look up your USERKEY anytime if you log in on http://www.aspsms.com and visit the following page: https://www.aspsms.com/userkey.asp

Usage

SMS.Userkey  = "XXXXXXXXXXXX"

Password

Used to authenticate your ASPSMS account.

If you forgot your personal password, you have the possibility to get the password by E-Mail on the following page: https://www.aspsms.com/login.asp?ACTION=password

Usage

SMS.Password = "XXXXXX"

Originator

Specifies an alphanumeric or nummeric originator.

It can be a mobile phone number or a short text with a maximum of 11 characters.

Please be aware, that using this feature is delicate. ANY ABUSES OF THESE NICE FEATURE WILL BE TRACKED AND PROSECUTED ACCORDING TO SERIOUS CIVIL- AND/OR CRIMINAL LAW REGULATIONS. We will close such accounts immediately without prior notification. Thank you for your understanding.

Usage

SMS.Originator = "aspsms.com"

FlashingSMS

If set to "True", a text-message will displayed directly in the display of the recipient.

Usage

SMS.FlashingSMS = True

BlinkingSMS

If set to "True", the text-message or parts of it will blink, when the message is displayed on the mobilephone. If used, the total number of used characters is limited to 69 characters. Note: In the moment, this features works only on the Nokia phones Nokia 3210, 3310, 5110, 6110, 6150, 8210, 8810, 8850. With the command, used in the messagetext, itís possible to control the appearance of the blinking the text. This feature works in conjunction with the methods "SendTextSMS" and "SendVCard".

Usage

Example 1, complete message is blinking:

SMS.BlinkingSMS = True
SMS.MessageData = "Every character in this message blinks"

Example 2, Message "I love you!", but only the word "love" is blinking

SMS.BlinkingSMS = True 
SMS.MessageData = "I <BLINK> love </BLINK> you!"

ReplaceMessage

If set to a value ranging from 1 to 7, this allows to overwrite existing messages on a handset with the same ReplaceMessage value.

Usage

SMS.ReplaceMessage = 5

MCC

Mobile-Country-Code, should be specified when sending operator-logos

Usage

SMS.MCC = 228

MNC

Mobile-Network-Code, should be specified when sending operator-logos

Usage

SMS.MNC = 1

Special information: MCC and MNC

The Mobile-Country-Code and the Mobile-Network-Code should be specified when sending operator-logos. If these parameters are not set, our system tries to evaluate these parameters with the Recipient-Address.

The complete list of operator codes is available at http://www.gsmworld.com/roaming/gsminfo/index.shtml.

To delete an existing logo from a mobilephone, set both MCC and MNC to -1. After having received and saved a logo sent with this parameters, the logo disappears and the mobilephone is set back to its original state without logo.

URLBinaryFile

Specifies a file, that stores binary-data. For Logos and Picture-Messages, the format must be *.bmp, for ringtones, a *.ott or *.txt file has to be specified (*.ott =OTA Tone, *.txt =RTTTL format)

Supported formats:

Operator Logos:
Bitmap 72 * 14 Pixel (*.bmp, black/white)

Picture Messages:
Bitmap 72 * 28 Pixel (*.bmp, black/white)

Ringtones:
The Ringtonefiles have to be compliant to Nokring or Nokia PC Composer

Usage

SMS.BinaryFileLocation = "http://www.mysite.com/images/logo17.bmp" 

VCardName Specifies the Name that will show up in a phonebook entry.

Usage

SMS.VCardName = "Sandra"

VCardPhoneNumber Specifies the Phonenumber that will used in a phonebook entry.

Usage

SMS.VCardPhonenumber = "+417912345678"

XSer

Additional information for binary messages, only used when sending directly to the SMSC gateway. Check UCP specification for additional information.

Usage

SMS.XSer = "010706050415821582"

MessageData

Message that will be sent, can be text or binary hex-coded.

Usage

SMS.MessageData = "This is a Textmessage"
SMS.MessageData = "22F81001480E0100000014000000"

NotificationInquirySettingsFormat

Specifies the format of the returned result of the method InquireDeliveryNotifications.

The datevalues of Submissiondate and Notificationdate are in the format "ddmmyyyyhhmmss".

Possible values:

Format 0 (default)
Complete information with Carriage Return (Asciicodes 13 and 10) at the line end
(TransactionReferenceNumber <Separator> DeliveryStatus <Separator> SubmissionDate <Separator> NotificationDate <Separator> Reasoncode<Carriage Return>)

Example of a Result in this format:

SMS.NotificationInquirySettingsFormat = 0
SMS.NotificationInquirySettingsSeparator = "|"

1234567890|1|22052001213354|2205201213401|107

Format 1
Complete information with userdefined separator at the line end
(TransactionReferenceNumber <Separator> DeliveryStatus <Separator> SubmissionDate <Separator> NotificationDate <Separator> Reasoncode <Separator>)

Example of a Result in this format:

SMS.NotificationInquirySettingsFormat = 1
SMS.NotificationInquirySettingsSeparator = "|"

1234567890|1|22052001213354| 220501213401|107| 

Format 2
Simple information with Carriage Return (Asciicodes 13 and 10) at the line end
(TransactionReferenceNumber <Separator> DeliveryStatus<Carriage Return>)

Example of a Result in this format:

SMS.NotificationInquirySettingsFormat = 2
SMS.NotificationInquirySettingsSeparator = "|"

1234567890|1

Format 3
Simple information with userdefined separator at the line end
(TransactionReferenceNumber <Separator> DeliveryStatus <Separator>)

Example of a Result in this format:

SMS.NotificationInquirySettingsFormat = 3
SMS.NotificationInquirySettingsSeparator = "|"

1234567890|1|

NotificationInquirySettingsSeparator

Specificies a user defined separator which will be part of the result of the method InquireDeliveryNotifications. Default value is the horizontal tabulator sign (ascii code 9)

Usage

SMS.NotificationInquirySettingsSeparator = "|"

TimeZone

Specifies the Timezone where the component is used. Itís only necessary to set this property when the property DeferredDeliveryTime is used and the component is used outside the timezone GMT +1.

Usage

When i.e. in Helsinki (GMT+2)

SMS.TimeZone = "2"

DeferredDeliveryTime

If set, specifies when a submitted Message should be sent. The format is "ddmmyyyyhhmmss". If the component is used outside the timezone GMT+1, the property "TimeZone" should also be set.

Usage

SMS.DeferredDeliveryTime = "09032004154500"

URLBufferedMessageNotification

URL that will be connected when a message is not delivered instantly and is buffered. The value of the submitted TransactionReferenceNumber will be the argument of the URL.

Usage

SMS.URLBufferedMessageNotification = "http://www.mysite.com/buffered.asp?ID="

When the TransactionReferenceNumber is e.g. 3152, the URL will be requested like this: http://www.mysite.com/buffered.asp?ID=3152

Cost: FREE

URLDeliveryNotification

URL that will be connected when a message is delivered instantly.The value of the submitted TransactionReferenceNumber will be the argument of the URL.

Usage

SMS.URLDeliveryNotification = "http://www.mysite.com/delivered.asp?ID="

When the TransactionReferenceNumber is e.g. 3152, the URL will be requested like this: http://www.mysite.com/delivered.asp?ID=3152

Cost: FREE

URLNonDeliveryNotification

URL that will be connected when a message is not delivered. The value of the submitted TransactionReferenceNumber will be the argument of the URL

Usage

SMS.URLNonDeliveryNotification = "http://www.mysite.com/notdelivered.asp?ID="

When the TransactionReferenceNumber is e.g. 3152, the URL will be requested like this: http://www.mysite.com/notdelivered.asp?ID=3152

Cost: FREE

Spezial information: URL properties

The following instructions do extend the functionality of the URL properties in very powerful way.

The URL properties may be used like described below:

URLBufferedMessageNotification =
"http://www.yourhost.com/Buffered.asp?SCTS=<SCTS>" &_
"&DSCTS=<DSCTS>&RSN=<RSN>&DST=<DST>&TRN=<TRN>"
URLDeliveryNotification =
"http://www.yourhost.com/Delivered.asp?SCTS=<SCTS>" &_
"&DSCTS=<DSCTS>&RSN=<RSN>&DST=<DST>&TRN=<TRN>"
URLNonDeliveryNotification =
"http://www.yourhost.com/NotDelivered.asp?SCTS=<SCTS>" &_
"&DSCTS=<DSCTS>&RSN=<RSN>&DST=<DST>&TRN=<TRN>"

The corresponding URLs are loaded by ASPSMS, if the relevant events occur.

The following tags are placeholders and are being filled with values when loaded.

  • <RCPNT> (Recipient, Mobilenumber)
  • <SCTS> (Servicecenter Timestamp, Submissiondate)
  • <DSCTS> (Delivery Servicecenter Timestamp, Notificationdate)
  • <RSN> (Reasoncode)
  • <DST> (Deliverystatus)
  • <TRN> (Transactionreferencenummer)

The tags within the definition of the URL may be placed on any position, the lenght of one URL is limited to 200 chars.

One URL, which may be called ASPSMS, could look like the following:

http://www.yourhost.com/Buffered.asp?SCTS=25062002120236&DSCTS=25062002120241&RSN=107&DST=1&TRN=00001

Explanation:
Submissiondate: 25.06.2002 12:02:36
Notificationdate: 25.06.2002 12:02:41
Reasoncode: 107 (Absent Subscriber)
Deliverystatus: 1 (Buffered)
Transactionreferencenumber: 00001

Please note also that after Deliverystatus 1 (Buffered) nearly always the URL is called a secondtime with Deliverystatus 0 (Delivered, Good) or Deliverystatus 2 (Not delivered, Bad).

Cost: Specifying the URL properties is for free.

Credits

Number of remaining credits, that can be used for sending messages, read-only.

Usage

Dim rTemp
rTemp = SMS.Credits

ErrorCode

After invoking a method the property ErrorCode holds a value, related to the last operation. If the operation was successful, ErrorCode is 1. If there was an error, the value is different from 1.

Usage

SMS.SendRandomLogo 
If SMS.Errorcode = 1 then 
  Msgbox "Logo successfully sent"
else 
  Msgbox SMS.ErrorDescription 
End if

ErrorDescription

The property ErrorDescription gives specific information, why an error has occured.

Usage

SMS.SendRandomLogo 
If SMS.Errorcode = 1 then 
  Msgbox "Logo successfully sent"
else 
  Msgbox SMS.ErrorDescription 
End if

XmlLog

Includes the dialog between the ASPSMS_XML VBScript Class and the ASPSMS XML Interface (read only).

Usage

Dim sXmlLog
sXmlLog = SMS.XmlLog

Method Description
AddRecipient Adds a Recipient and a TransactionReferencenumber. With the AddRecipient method, it's possible to send messages to a maximum of 1000 recipients at the same time. The TransactionReferencenumber should be unique to ensure an accurate tracking of the delivery notifications.

Because optional arguments to a subroutine are not supported in VBScript, the TransactionReferencenumber must be set. When not needed, set it to a zero-length string ("").

Usage

SMS.AddRecipient "+41792343541", ""
SMS.AddRecipient "+41792343542", "" 
SMS.AddRecipient "+41799676833", "3151" 
SMS.AddRecipient "+41798649044", "3152"
SMS.AddRecipient "+41798649045", "3153"

DeleteAllRecipients

Deletes all previously added Recipients. Used, when calling i.E. SendTextSMS several times without killing and newly creating an instance of the class.

Usage

...
SMS.AddRecipient "+41792343541", ""
SMS.AddRecipient "+41792343542", "" 
SMS.SendTextSMS
SMS.DeleteAllRecipients

SMS.AddRecipient "+41799676833", "3151" 
SMS.AddRecipient "+41798649044", "3152"
SMS.AddRecipient "+41798649045", "3153"
SMS.SendTextSMS
...

SendTextSMS

Sends a Text-Message

If using messages with overlength, each part will reduced from 160 to 153 chars, because additional information is required for concatenation handling. The messagetext may up to 9 * 153 chars in length.

Usage

SMS.SendTextSMS

Cost: (1 * termination fee multiplier) Credits / Recipient and messagepart

*The termination fee multiplier usually is 1. This results in a total credit consumption of 1 Credit per SMS.
Some network providers charge additional termination fees. Please note: The effective price is calculated by multiplication of the 'Price per Message Type' with the fee mulitiplier.

Please refer to http://www.aspsms.com/instruction/prices.asp for detailed information.

SendRandomLogo

Sends a Random-Operatorlogo out of a collection of several hundred logos.

Usage

SMS.MCC = 228
SMS.MNC = 2
SMS.SendRandomLogo

Cost: (1 * termination fee multiplier) Credits / Recipient and logo

*The termination fee multiplier usually is 1. This results in a total credit consumption of 1 Credit per SMS.
Some network providers charge additional termination fees. Please note: The effective price is calculated by multiplication of the 'Price per Message Type' with the fee mulitiplier.

Please refer to http://www.aspsms.com/instruction/prices.asp for detailed information.

SendLogo

Sends an Operatorlogo.

Usage

SMS.MCC = 228
SMS.MNC = 2
SMS.URLBinaryFile = "http://www.yourhost.com/logo.bmp"
SMS.SendLogo

Cost: (1 * termination fee multiplier) Credits / Recipient and logo

*The termination fee multiplier usually is 1. This results in a total credit consumption of 1 Credit per SMS.
Some network providers charge additional termination fees. Please note: The effective price is calculated by multiplication of the 'Price per Message Type' with the fee mulitiplier.

Please refer to http://www.aspsms.com/instruction/prices.asp for detailed information.

SendGroupLogo

Sends a group logo.

Usage

SMS.MCC = 228
SMS.MNC = 2
SMS.URLBinaryFile = "http://www.yourhost.com/logo.bmp"
SMS.SendGroupLogo

Cost: (1 * termination fee multiplier) Credits / Recipient and logo

*The termination fee multiplier usually is 1. This results in a total credit consumption of 1 Credit per SMS.
Some network providers charge additional termination fees. Please note: The effective price is calculated by multiplication of the 'Price per Message Type' with the fee mulitiplier.

Please refer to http://www.aspsms.com/instruction/prices.asp for detailed information.

SendPictureMessage

Sends a picture message.

Usage

SMS.URLBinaryFile = "http://www.yourhost.com/picturemessage.bmp"
SMS.SendPictureMessage

Cost: (3 * termination fee multiplier) Credits / Recipient and picture message

*The termination fee multiplier usually is 1. This results in a total credit consumption of 3 Credits per picture message.
Some network providers charge additional termination fees. Please note: The effective price is calculated by multiplication of the 'Price per Message Type' with the fee mulitiplier.

Please refer to http://www.aspsms.com/instruction/prices.asp for detailed information.

SendRingtone

Sends a ringtone.

Usage

SMS.URLBinaryFile = "http://www.yourhost.com/ringtone.ott"
SMS.SendRingtone

Cost: (1 * termination fee multiplier) Credits / Recipient and ringtone

*The termination fee multiplier usually is 1. This results in a total credit consumption of 1 Credit per SMS.
Some network providers charge additional termination fees. Please note: The effective price is calculated by multiplication of the 'Price per Message Type' with the fee mulitiplier.

Please refer to http://www.aspsms.com/instruction/prices.asp for detailed information.

SendVCard

Sends a VCard.

Usage

SMS.VCardName = "Sandra"
SMS.VCardPhoneNumber = "+417912345678"
SMS.SendVCard

Cost: (1 * termination fee multiplier) Credits / Recipient and VCard

*The termination fee multiplier usually is 1. This results in a total credit consumption of 1 Credit per SMS.
Some network providers charge additional termination fees. Please note: The effective price is calculated by multiplication of the 'Price per Message Type' with the fee mulitiplier.

Please refer to http://www.aspsms.com/instruction/prices.asp for detailed information.

SendBinaryData

Sends binary data directly to the gateway, XSer has to be specified, too.

Usage

SMS.XSer        = "010706050415821582"
SMS.MessageData = "22F81001480E01000000000FF0000000" & _
                  "00042000100C00000000411980619380" & _
                  "000000208240825A7C00000000642302" & _
                  "DB03FC000008143C42FC800400000404" & _
                  "03818480F8000003041C1884BF000000" & _
                  "0082E00879C0000000000F0004020000" & _
                  "000003F003830C000000000200FC60F0" & _
                  "0000000003FF001F0000000000000000" & _
                  "0000000000"
SMS.SendBinaryData

Cost: (1 * termination fee multiplier) Credits / Recipient and binary message

*The termination fee multiplier usually is 1. This results in a total credit consumption of 1 Credit per SMS.
Some network providers charge additional termination fees. Please note: The effective price is calculated by multiplication of the 'Price per Message Type' with the fee mulitiplier.

Please refer to http://www.aspsms.com/instruction/prices.asp for detailed information.

AddTransRefNumberForNotificationInquiry

Adds a Transactionreferencenumber which is used for later use with the method InquireDeliveryNotifications. Up to 1000 TransactionreferenceNumbers may be added at the same time.

Usage

SMS.AddTransRefNumberForNotificationInquiry "3152"

Note: The submitted TransactionReferencenumber has to be specified before, when the message was sent. e.g.

SMS.AddRecipient "+41799676834", "3152"

InquireDeliveryNotifications

Inquires the status of sent messages and returns a string, which contains the query result.

Usage

SMS.AddTransRefNumberForNotificationInquiry "3152"
sResult = SMS.InquireDeliveryNotifications

Note: Before using this method, AddTransRefNumberForNotificationInquiry has to be called at least one time with a valid TransactionReferenceNumber.

Cost: 0,25 Credits / TransactionReferenceNumber