Forums » .NET » .NET »

how to send email to perticular mailid .net


Posted Date: 18 Dec 2008      Posted By:: yashwant     Member Level: Silver    Member Rank: 2726     Points: 1   Responses: 2



how to send email to perticular mailid .net

urgent

thanks
yashwant




Responses

#330493    Author: SSS      Member Level: Gold      Member Rank: 267     Date: 18/Dec/2008   Rating: 2 out of 52 out of 5     Points: 4

HI,
take this example

import the namespace :-
Imports System.Web.Mail
--------------------

Sub sendmail(ByVal password)

Dim objEmail As New MailMessage
objEmail.To = txtEmail.Text
objEmail.From = "rajan@gmail.com"
objEmail.Subject = "Regarding Password"
objEmail.Body = "this is your new password " + password
Try
SmtpMail.Send(objEmail)
txtUserName.Text = ""
txtEmail.Text = ""
Response.Write("Your E-mail has been sent sucessfully")

Catch exc As Exception
Response.Write("Send failure: " + exc.ToString())
End Try
End Sub

G.Rajan
Happy New Year



 
#330502    Author: Dinesh Kumar Sabat      Member Level: Silver      Member Rank: 1786     Date: 18/Dec/2008   Rating: 2 out of 52 out of 5     Points: 1

Configure your default mail client and SMTP server .

Only then you can send mails...



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : how to find each cell value in gridview
Previous : Lease Time Expiration in .net Remoting
Return to Discussion Forum
Post New Message
Category:

Related Messages
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.