Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Hello,
how user sends fedback to admin .
user fills some textboxes as name, emailid, contact, then user presses the button and sends feedback to admin in mail. how it is done ?
i am confused in mail function. it is not working
Posted 26-Sep-12 2:48am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Try a simple search on google[^], which gives you about 1,830,000 results.
 
Also check on CP Search[^], for more similar threads.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Function For Sending Email
Public Sub sendEmail(ByVal Recip As String, ByVal Subj As String, ByVal Msg As String, _
                     ByVal FromAdd As String, ByVal Pass As String, ByVal SMTP_Host As String, _
                     ByVal SMTP_Port As Integer)
 
 Try
            Dim SmtpServer As New System.Net.Mail.SmtpClient()
            Dim mail As New System.Net.Mail.MailMessage()
 
            SmtpServer.EnableSsl = True
            SmtpServer.Credentials = New  _
            Net.NetworkCredential(FromAdd, Pass)
            SmtpServer.Port = SMTP_Port
            SmtpServer.Host = SMTP_Host
            mail = New System.Net.Mail.MailMessage()
            mail.From = New System.Net.Mail.MailAddress(FromAdd, "Test Message")
            mail.To.Add(Recip)
            mail.IsBodyHtml = True
            mail.Subject = Subj
            mail.Body = Msg
            SmtpServer.Send(mail)
            MsgBox("Mail Sent!", MsgBoxStyle.Information, "Sent")
 
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
end sub
  Permalink  
v3
Comments
Jasbeer Singh at 27-Sep-12 3:29am
   
Net.NetworkCredential(FromAdd, Pass)
what is frmAdd and password,
 
which password ?
Ervin Pacibe at 27-Sep-12 11:09am
   
Recip = Recipients
Subj = Subject
Msg = Message
FromAdd = From(ur gmail account)
Pass = Password
Jasbeer Singh at 29-Sep-12 1:41am
   
error : Server does not support secure connections.
Ervin Pacibe at 29-Sep-12 9:43am
   
use gmail acc..and use gmail server..

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

  Print Answers RSS
0 OriginalGriff 410
1 Gihan Liyanage 338
2 ChauhanAjay 180
3 Vinay Mistry 160
4 Sergey Alexandrovich Kryukov 138
0 Sergey Alexandrovich Kryukov 9,011
1 OriginalGriff 7,941
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100