How do I send an SMS using Delphi 5?

Posted on 2003-03-06
Medium Priority
Last Modified: 2013-11-13
What components are necessary, and how do you go about writing code to send an SMS to a cellular phone?(Sample Code Would be nice)
Question by:Peter-Lalor
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

msa2003 earned 1300 total points
ID: 8084040
SMS could be sent from PC using cellular phone's operator's SMTP (e-mail) gateway. Different operators uses diferent gateways to let their users receive e-mail messages, but you could obtain the gateway address using your operator's customer support. The mailbox address probably will look like:

where XXXXXXX - phone number; server.com - gateway address.

To implement SMTP protocol in Delphi you will need Indy SMTP client (TIdSMTP). Place it on the form. Here is an example of how to use TIdSMTP component to send SMS message (assuming it is called IdSMTP1):

IdSMTP1.QuickSend('smtp.provider.net', 'Subject', 'XXXXXXX@server.com',
    'myaddr@provider.net', 'Hello, world!');


smtp.provider.net - your Internet provider's SMTP server where you have a valid mailbox or any public mail service with SMTP access (slower);

Subject - the subject of the message;

XXXXXXX@server.com - phone's e-mail;

myaddr@provider.net - mailbox address from which to send SMS;

Hello, world! - message body.

If you have not Indy components ask me and I will provide source code which to use TClientSocket component or WinSock API to send a message.

Some mobile providers also has HTTP gateways. Somtimes usage of HTTP is better than SMTP.

Expert Comment

ID: 9447306
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Expert Comment

ID: 9452388
I think, this thread needs to be continued. I could not provide an exhausting information because I need additional comments from the question author.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question