dcsimg
Results 1 to 3 of 3

Thread: sms and e-mail

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2012
    Posts
    6

    sms and e-mail

    Please how can i use vb.net to develop a desktop application(not web-based) that can send e-mail and sms to clients

  2. #2

  3. #3
    New Member
    Join Date
    Jun 2012
    Posts
    11

    Re: sms and e-mail

    you may try this code this code is to send email using vb.net but if you want to try this code the email add that
    you enter must be gmail

    Imports System.Net.Mail


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Dim smtp As New SmtpClient
    Dim msg As New MailMessage


    msg.From = New MailAddress("email@gmail.com") ' this code must be a gmail account
    msg.To.Add("any_email_add@yahoo.com")' this one is to send in any email address
    msg.Subject = "hello"
    msg.Body = "hi"
    smtp.EnableSsl = True 'ssl is a security this one is always true
    smtp.Host = "smtp.gmail.com" ' this one is a host of gmail
    smtp.Port = 587 'this one is a local port of gmail
    smtp.Credentials = New Net.NetworkCredential(gmail account, gmail password) ' credentials it check if your
    'email add is exist

    smtp.Send(msg)
    MsgBox("sent")


    end sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width