Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2004, 05:25 AM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Send email from a VB .NET Form

Can someone please give me the code to send the following email from my web form written in VB .NET. I am only interested in the body of the email message as I am ok with the rest. It is important that my email body is structured and readable.

Here is my sample email body:

[u]Name</u>: Kerry O'Carroll
Address: 15 Any Street
Town: Any Town
Date: 8/10/04
Reference: 123456
Price: $126.50

Thanks for your help


Kerry O'Carroll
__________________
Kerry O\'Carroll
 
Old October 8th, 2004, 05:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Imports System.Web.Mail

Dim strBody as String = String.Empty
strBody &= "Name: " & strName & ControlChars.CrLf & _
 "Address: " & strAddress & ControlChars.CrLf & _
 ... and so on ...

SmtpMail.SmtpServer = "<server>"
SmtpMail.Send("from", "to", "subject", strBody)

Brian
 
Old October 8th, 2004, 07:16 PM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Brian,

Thanks - that worked

Kerry

Kerry O'Carroll





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP VB.Net send email Greavr ASP.NET 2.0 Basics 3 August 26th, 2008 07:59 PM
read/send email using WEBDEV and vb.net prashanthudupa.k Excel VBA 0 September 21st, 2006 06:39 AM
Send form data using VB ratheeshpkr Classic ASP XML 0 October 18th, 2004 01:19 AM
email messaging from windows form in vb.net rita General .NET 2 June 20th, 2004 10:41 PM
Smtp blocked, how can I send email use asp.net calvinpost ASP.NET 1.x and 2.0 Application Design 7 April 1st, 2004 09:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.