Click here to Skip to main content
12,759,135 members (33,095 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET
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 3:48am
Rate this: bad
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.
Rate this: bad
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)

            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.IsBodyHtml = True
            mail.Subject = Subj
            mail.Body = Msg
            MsgBox("Mail Sent!", MsgBoxStyle.Information, "Sent")

        Catch ex As Exception
        End Try
end sub
Jasbeer Singh 27-Sep-12 3:29am
Net.NetworkCredential(FromAdd, Pass)
what is frmAdd and password,

which password ?
Ervin Pacibe 27-Sep-12 11:09am
Recip = Recipients
Subj = Subject
Msg = Message
FromAdd = From(ur gmail account)
Pass = Password
Jasbeer Singh 29-Sep-12 1:41am
error : Server does not support secure connections.
Ervin Pacibe 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170217.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2017
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