Click here to Skip to main content
15,929,253 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionInternal Search Statistics Pin
tmoney1015-Nov-06 18:45
tmoney1015-Nov-06 18:45 
AnswerRe: Internal Search Statistics Pin
coolestCoder5-Nov-06 20:14
coolestCoder5-Nov-06 20:14 
GeneralRe: Internal Search Statistics Pin
tmoney1016-Nov-06 3:04
tmoney1016-Nov-06 3:04 
QuestionDropdown List Pin
Khan.Bangash5-Nov-06 18:42
Khan.Bangash5-Nov-06 18:42 
QuestionDetermine sucess or failure of mail sending Pin
Nitin19815-Nov-06 18:42
Nitin19815-Nov-06 18:42 
GeneralRe: Determine sucess or failure of mail sending Pin
quiteSmart5-Nov-06 19:35
quiteSmart5-Nov-06 19:35 
AnswerRe: Determine sucess or failure of mail sending Pin
coolestCoder5-Nov-06 20:02
coolestCoder5-Nov-06 20:02 
GeneralRe: Determine sucess or failure of mail sending Pin
Nitin19815-Nov-06 20:13
Nitin19815-Nov-06 20:13 
Hi Pls find code mentioned below


Imports System.Net.Mail
Partial Class Default2
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        'create the mail message
        Dim mail As New MailMessage()

        Try

        
            'set the addresses
            'to specify a friendly 'from' name, we use a different ctor
            mail.From = New MailAddress(TextBox1.Text)
            mail.To.Add(TextBox2.Text)

            'set the content
            mail.Subject = "This is an email"
            mail.Body = TextBox3.Text

            'send the message
            Dim smtp As New SmtpClient("127.0.0.1")

            smtp.Send(mail)
        Catch ex As Exception
            Label1.Text = ex.ToString
        End Try
    End Sub
End Class


(Dot net 2.0)
If still you are unable to send mail using above code. Go to SMTP Virtual server properties --> Access and in connection and Relay specify your server



Don't Quit

AnswerRe: Determine sucess or failure of mail sending Pin
coolestCoder5-Nov-06 19:54
coolestCoder5-Nov-06 19:54 
GeneralRe: Determine sucess or failure of mail sending Pin
Nitin19815-Nov-06 20:22
Nitin19815-Nov-06 20:22 
GeneralRe: Determine sucess or failure of mail sending Pin
coolestCoder5-Nov-06 20:50
coolestCoder5-Nov-06 20:50 
GeneralRe: Determine sucess or failure of mail sending Pin
Nitin19815-Nov-06 22:07
Nitin19815-Nov-06 22:07 
GeneralRe: Determine sucess or failure of mail sending Pin
coolestCoder5-Nov-06 22:48
coolestCoder5-Nov-06 22:48 
QuestionHow to apply style to controls (urgent) Pin
dj.rock5-Nov-06 18:39
dj.rock5-Nov-06 18:39 
AnswerRe: How to apply style to controls (urgent) Pin
Akhilesh Yadav5-Nov-06 19:22
Akhilesh Yadav5-Nov-06 19:22 
GeneralRe: How to apply style to controls (urgent) Pin
dj.rock5-Nov-06 19:28
dj.rock5-Nov-06 19:28 
QuestionGridview PageIndexChanging Error Pin
Brendan Vogt5-Nov-06 18:28
Brendan Vogt5-Nov-06 18:28 
AnswerRe: Gridview PageIndexChanging Error Pin
playout8-Nov-06 2:49
playout8-Nov-06 2:49 
QuestionRetain Password Pin
litson jose5-Nov-06 18:12
litson jose5-Nov-06 18:12 
AnswerRe: Retain Password Pin
thomas_joyee5-Nov-06 18:28
thomas_joyee5-Nov-06 18:28 
GeneralRe: Retain Password Pin
litson jose5-Nov-06 19:36
litson jose5-Nov-06 19:36 
QuestionHow to convert codebehind into inline.. Pin
Sam.M5-Nov-06 17:59
Sam.M5-Nov-06 17:59 
QuestionHow to convert codebehind into inline.. Pin
Sam.M5-Nov-06 17:59
Sam.M5-Nov-06 17:59 
AnswerRe: How to convert codebehind into inline.. Pin
Sathesh Sakthivel5-Nov-06 18:04
Sathesh Sakthivel5-Nov-06 18:04 
Questiondatagrid with a fixed column? Pin
Tridip Bhattacharjee5-Nov-06 17:56
professionalTridip Bhattacharjee5-Nov-06 17:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.