首先通過下面的地址下載並安裝微軟SOAP工具包2.0:
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.ASP?url=/msdn-files/027/001/580/msdncompositedoc.XML
然後就可以使用下面的簡短代碼發送SMS了。
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.SendTextMessage('Number', 'MessageBody', 'Sender');
end;
其中Number為國家代碼+電話號碼(不需要以零打頭),
如 06 12345678 在荷蘭:31612345678