ust select SMTP control from Components ( under project menu (visual basic))

With SMTP 'name for control
.Server = outgoingserver 'Outgoing server name or IP address

.MailFrom = mailFrom 'Sender mail address

.SendTo = mailto 'to whom you want to send mail

.MessageSubject ='Subject of message

.MessageText = mailtext 'mail text

.Attachements.Add attachmentpath 'if you want ot attach any file just give the path here



End With

Was This Post Helpful? 0 Back to top
Quote + Reply

but smtp cotrol does not exist in componants

Recommended Answers

All 2 Replies

If you are going to use SMTP, you will need to send to a number based on the particular carrier. You would need to use a particular SMS Gateway.

There are other services that you can possibly automate to send to a mobile when you do not know the carrier.

Also, can you use VB.NET for this? There are much more elegant solutions if you can.

Hi Shilpa,

The code, you have given is for sending EMails not SMS.
For SMS, you need to use SMS Gateways.. (like GupshupSMS, mvaayoo)


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.