How to make a text message sender in vb 2008!

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
4 posts Page 1 of 1
Contributors
User avatar
Proprogrammer
VIP - Donator
VIP - Donator
Posts: 415
Joined: Sun Oct 03, 2010 11:14 pm

First import this...
Imports System.Net.Mail

Basicly this is just like sending a email, but you have to do something different!

Put 2 textboxes and a button
1 textbox for subject and another for description

Button1_clickevent
Code: Select all
Dim smtpServer As New SmtpClient()
        Dim mail As New MailMessage()
        smtpServer.Credentials = New Net.NetworkCredential("email@gmail.com", "PASSWORD")
        'using gmail
        smtpServer.Port = 587
        smtpServer.Host = "smtp.gmail.com"
        smtpServer.EnableSsl = True
        mail = New MailMessage()
        mail.From = New MailAddress("email@gmail.com")
        mail.To.Add("putyour#here@txt.att.net ")'<----------------------------- after the @ that is where you put the location for the service provider, the one above is for at&t, for more look on the bottom!
        mail.Subject = Textbox1.text
        mail.Body = Textbox2.text
        smtpServer.Send(mail)
:mrgreen:

Other service providers:
tmobile- @tmomail.net

verison- @vtext.com

for any others ask me!
------------------------------------------------------------------------------
Proprogrammer, not just a Programmer.
User avatar
bisnes_niko
Serious Programmer
Serious Programmer
Posts: 409
Joined: Tue Aug 24, 2010 1:21 pm

Did you just hand us your gmail account? If so, you better change the password.

I think we have SMTP tutorial already here.
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

I think its pretty simple but the code works like a charm!
Image
User avatar
lil-wayneee
Member
Member
Posts: 29
Joined: Thu Mar 17, 2011 10:24 pm

Its a nice tut I have tryed before ty (:
Image
4 posts Page 1 of 1
Return to “Tutorials”