Click here to Skip to main content
15,894,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I would like to ask for a help on making an application that will send sms and e-mail messages using vb.net or vb express. Using a modem for that application that we will use to send to our cluster heads on time.


Thank you,
cryll
Posted
Comments
Richard MacCutchan 11-Aug-12 4:12am    
Exactly what help are you asking for? If you expect someone to provide you with a full working solution then you are going to be disappointed. If you have specific technical problems then please edit you question and explain what they are.
Volynsky Alex 11-Aug-12 4:28am    
Also you can read following article:
http://www.codeproject.com/Articles/43609/Email-and-SMS-Sending-Through-VB-NET-for-Free

hii,
for email you need not anything other than internet and for sms you need to study hyper terminal at commands.

Sample code is available at

http://www.sourcecodester.com/visual-basic-net/net-version-sending-sms-using-commands-gsm-modemgsm-phone.html[^]


vb.net AT commands to send SMS[^]
 
Share this answer
 
VB.NET using SMTP protocol for sending email . SMTP stands for Simple Mail Transfer Protocol . VB.NET using System.Net.Mail namespace for send mail . We can instantiate SmtpClient class and assign the Host and Port . The default port using SMTP is 25 , but it may vary different Mail Servers .In the following example shows how to send an email from a Gmail address.

The Gmail SMTP server name is smtp.gmail.com and the port using send mail is 587. Here using NetworkCredential for password based authentication.
VB
Imports System.Net.Mail
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
        Try
            Dim SmtpServer As New SmtpClient()
            Dim mail As New MailMessage()
            SmtpServer.Credentials = New _
		Net.NetworkCredential("username@gmail.com", "password")
            SmtpServer.Port = 587
            SmtpServer.Host = "smtp.gmail.com"
            mail = New MailMessage()
            mail.From = New MailAddress("YOURusername@gmail.com")
            mail.To.Add("TOADDRESS")
            mail.Subject = "Test Mail"
            mail.Body = "This is for testing SMTP mail from GMAIL"
            SmtpServer.Send(mail)
            MsgBox("mail send")
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
 
Share this answer
 
Comments
Abdul Quader Mamun 11-Aug-12 4:40am    
good work!
Volynsky Alex 11-Aug-12 7:00am    
Thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900