views:

33

answers:

2

Using ASP.Net, VB.Net

In my web page, i have the textbox values

when i press the send button the textbox value automatically send to email address...

How to do that...

Need Code Help

A: 

The Code sample is as follow:

Dim oMsg As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
oMsg.From = "[email protected]"
oMsg.To = "[email protected]"
oMsg.Subject = "Email with Attachment Demo"
oMsg.Body = "This is the main body of the email"
Dim oAttch As MailAttachment = New MailAttachment("C:\myattachment.zip")
oMsg.Attachments.Add(oAttch)
SmtpMail.Send(oMsg)

You can also find an example ;on the following link:

http://www.thescarms.com/dotnet/Email.aspx

Shivkant