Sending SMS

sunil

New Member
I have Microsoft Exchange server Email system I want write a programe to send SMS through this server Earliyer we hade a Mdeamon E-Mail System through that I Send the sms using progress programe but that is not apply for Exchange server if any one can send a Sample programe for me it is very mouch help for me.

Here I past my old program

*** My Exchange Server IP is 192.168.10.5
*** My Mdeamon Server IP is 192.168.10.243

DEFINE VAR objSMTP AS COM-HANDLE.
DEFINE VAR Xa AS INTEGER INIT 0.
DEFINE VAR strFrom AS CHAR FORMAT "x(50)" INITIAL sunilj@phoenix.lk".
DEFINE VAR strTo AS CHAR FORMAT "x(50)".
DEFINE VAR strTo1 AS CHAR FORMAT "x(50)".
DEFINE VAR strTo2 AS CHAR FORMAT "x(50)".
DEFINE VAR strTo3 AS CHAR FORMAT "x(50)".
DEFINE VAR strCc AS CHAR FORMAT "x(50)".
DEFINE VAR strBc AS CHAR FORMAT "x(50)".
DEFINE VAR strBody AS CHAR FORMAT "x(200)".
CREATE "EasyMail.SMTP.6" objSMTP.
/* strTo = "sunil@phoenixim.com". */
strTo = "3047106@dialog.lk".

objSMTP:LicenseKey = "Nguyen/S160600510560B007230NGUYEN".
objSMTP:MailServer = "192.168.10.5".
/* objSMTP:MailServer = "192.168.10.243". */
objSMTP:FromAddr = "SunilJ@phoenix.lk".
objSMTP:AddRecipient("", strTo , 1).

strBody = "TGT = " + STRING(zum-tar-amt,"->>>,>>>,>>9") + CHR(13).
strBody = strBody + "ACH = " + STRING(zum-inv-amt,"->>>,>>>,>>9") + CHR(13).
strBody = strBody + "BAL = " + STRING(zum-dif-amt,"->>>,>>>,>>9").

objSMTP:Subject = "Target Alert".
objSMTP:BodyText = strBody.
objSMTP:BodyFormat = 0.
Xa = objSMTP:Send.

IF xa <> 0 THEN MESSAGE "Please Contact System Administrator on +94 11-4-726020".
RELEASE OBJECT objSMTP.


Thanks you all
 

Jupiter

Member
Seems that you generate a string which is mailed to the exchange server from where it is sent as sms to the recipients. An alternative is to generate the message in the text or .xls format and send the message through a third party tool and service. I have developed a similar system with good results.
 
Top