borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (look for .net) New Topic New Poll Post Reply
AndreaVB Forum : ASP.Net : Mail Page in Asp.net ?
Poster Message
tri_inn
Level: Regular User
Registered: 26-08-2002
Posts: 395

icon Mail Page in Asp.net ?

How could I design a page with help asp.net and vb.net where user can compose and format his message and send normal and html mail to ‘N’ of person. If it is possible then please tell how could I do it and give me a sample project which can satisfy my requirement.

25-03-2004 at 02:07 PM
View Profile Send Email to User Show All Posts | Quote Reply
zimcoder
Level: VB Lord


Registered: 27-10-2003
Posts: 225
icon Re: Mail Page in Asp.net ?

Sending email in asp.net is very simple and straight forward.
The first thing to do is to import the approriate namespace for using email

Imports System.Web.Mail

then create an instance of the MailMessage class from  the above namespace

Dim Msg as New MailMessage

with this newly created message.. you can prepare your mail

Msg.To = "therecepient@theiraddress.com"
Msg.From = "yourname@sevriceaddress.com"

'To CC this email
Msg.Cc = "copiedto@theiraddress.com"
'To BCC
Msg.Bcc = "blindone@thosewhorblindaddress.com"

'Now you decide the format and Send the email in  format
Msg.BodyFormat = MailFormat.Html

'Set the priority - options are High, Low, and Normal
Msg.Priority = MailPriority.Normal

'Set the subject
Msg.Subject = "ASP.NET email"

'The body of the email

Msg.Body="This email has been sent from an asp.net page and is in html format!"

'now to send the email specify the smtp server

SmtpMail.Server ="mail.someaddress.com"

SmailMail.Send(Msg)


To send to a multiple of email addresses, write a function that will return a string with email addresses separated by commas after looping through a collection. this string can be used as input for Msg.To  or Msg.CC or Msg.Bcc

____________________________
BrainBench ADO.NET and ASP.NET Certified Developer

05-04-2004 at 06:28 PM
View Profile Send Email to User Show All Posts | Quote Reply
ROSIYANA
Level: Trainee

Registered: 15-04-2008
Posts: 1
icon Re: Mail Page in Asp.net ?

What do you mean by bdc and pcd in windows operting system 2003?

15-04-2008 at 06:30 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : ASP.Net : Mail Page in Asp.net ?
Next Topic (look for .net) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Il portale per lui e lei | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder