Wrox Programmer Forums
|
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 6th, 2004, 06:16 AM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Formatting Body of Email

Hi,

I want to send an email within my VB .NET web form using System.Web.Mail.MailMessage.

How can I structure the body of the email, eg I want it to contain itesm such as name, address, phone, etc with appropiate headings. I don't want it to be just continuous text.

Thanks

Kerry O'Carroll
__________________
Kerry O\'Carroll
 
Old October 6th, 2004, 06:48 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
Default

hi
you can send email using these code but it is in c# you can change it
to VB.NET.
 you can send a mail using your asp.net page for confirmation and using hosted site smtp email engine .
using tis code you can send email using asp.net
include this directive to your page.

<%@Import Namespace="System.Web.Mail" %>

MailMessage msgMailRespond = new MailMessage();
MailMessage msgMail = new MailMessage();
UTF8Encoding utf8 = new UTF8Encoding();
msgMail.BodyEncoding= utf8 ;
msgMail.To ="[email protected]";
msgMail.From =from.Text;
msgMail.Subject =strSubject.Text;
msgMail.BodyFormat = MailFormat.Html;
string strBody="<div style=\"font-family:tahoma,zar,arial,yagut ,font-size:14\">"+strMessageBody.Text;
 strBody+="<br></div>";
msgMail.Body = strBody;
SmtpMail.Send(msgMail);


YoOrD.

Beauty Is not on the face
Beauty is on the heart
--<<Ghibran Khalil>>--
 
Old October 6th, 2004, 06:49 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
Default

other thing that you can use html markups to build your email budeis.


Beauty Is not on the face
Beauty is on the heart
--<<Ghibran Khalil>>--
 
Old October 7th, 2004, 05:37 AM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Moharram,

I see what is required. I shall try it out. Thanks for your help

Regards


Kerry O'Carroll





Similar Threads
Thread Thread Starter Forum Replies Last Post
TextBox for Email body snufse ASP.NET 2.0 Basics 6 January 16th, 2008 12:01 PM
Corrupt HTML Body in CDO email patwadd Classic ASP Professional 3 July 26th, 2007 05:14 PM
Formatting Body of Email murfinp General .NET 0 August 18th, 2006 05:44 AM
Trying to access email body surbhi All Other Wrox Books 1 September 27th, 2004 05:16 AM
Grey box instead of imgae in email body AyatKh HTML Code Clinic 10 April 20th, 2004 10:41 AM





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