Mega Code Archive

 
Categories / Delphi / Ide Indy
 

Send a SMS (short message service to mobile phone) with Delphi

Title: Send a SMS (short message service to mobile phone) with Delphi Question: This sample shows how to call a SMS-webservice by using SOAP Answer: First, download and install the Microsoft SOAP Toolkit Version 2.0 from: http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/001/580/msdncompositedoc.xml uses ComObj; procedure TForm1.Button1Click(Sender: TObject); var SoapClient: OleVariant; v: OleVariant; begin SoapClient := CreateOleObject('MSSOAP.SoapClient'); SoapClient.mssoapinit('http://sal006.salnetwork.com:83/lucin/smsmessaging/process.xml'); SoapClient.SendMessage(*DestNumber*, *MessageBody*, *SenderName*, *SenderPass*); end; *DestNumber*: countrycode + phonenumber (no leading zero), e.g. for 06 12345678 in the netherlands: 31612345678 *SenderName* and *SenderPass* you can obtain from: http://www.salcentral.com/help/smsreg.htm