What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 23201 |  Welcome, Guest!   Register  Login
 Home > Code Snippets > ASP.NET > Send an Email in ASP Dot Net using SmtpMail ...
Chikul

Send an Email in ASP Dot Net using SmtpMail

 Code Snippet posted by: Chikul | Posted on: 1/25/2010 | Category: ASP.NET Codes | Views: 1149 | Status: [Member] | Alert Moderator   


Imports System.Drawing


Partial Class Default3
Inherits System.Web.UI.Page

Protected Sub btnSendMail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSendMail.Click
'Send an Email in ASP Dot Net using SmtpMail
Try
Dim EmailTo As String = "Sample@sss.com"
Dim EmailFrom As String = "ddddd@sss.com"
Dim EmailSubject As String = "Sample Email"
Dim EmailBody As String = "Test email"
System.Web.Mail.SmtpMail.Send(EmailFrom, EmailTo, EmailSubject, EmailBody)
Response.Write("Mail sent Successfully.")
Catch ex As Exception
Response.Write("Mail Process Failure.")
End Try

End Sub
End Class

Found interesting? Add this to:


>> Write Response - Respond to this post and get points

More codes snippets

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/22/2013 11:20:23 PM