Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 26th, 2009, 10:51 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: West Palm Beach, Florida, USA.
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Question SMTP Email question

Have following:

myEmail.To.Add(John.B@mycompany.com)

How would I add additional recipients to above line?
Reply With Quote
  #2 (permalink)  
Old June 26th, 2009, 11:34 AM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

You can add them as a comma-delimited list:

mEmail.To.Add(johnb@mycompany.com,sallyc@mycompany .com,joed@someotherplace.com)
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
Reply With Quote
The Following User Says Thank You to Lee Dumond For This Useful Post:
snufse (June 26th, 2009)
  #3 (permalink)  
Old July 9th, 2009, 12:08 PM
Authorized User
Points: 198, Level: 3
Points: 198, Level: 3 Points: 198, Level: 3 Points: 198, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2008
Location: singapore, singapore, Singapore.
Posts: 54
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Quote:
Originally Posted by snufse View Post
Have following:

myEmail.To.Add(John.B@mycompany.com)

How would I add additional recipients to above line?

you can add further also same as

myEmail.To.Add(email1@mycompany.com)
myEmail.To.Add(email2@mycompany.com)


for further information on sending Emails in ASP.net please refer to
http://www.vbknowledgebase.com/WebAp...ing-SmtpClient
__________________
Pon Saravanan
VbKnowledgebase.com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem sending email with SMTP in VB.Net Compiler Forum and Wrox.com Feedback 3 November 30th, 2007 07:25 PM
SMTP Email Error Handling Ron Howerton Pro Visual Basic 2005 1 July 12th, 2007 09:32 AM
Sending EMail thru SMTP server in C# - Most of the peri C# 1 December 20th, 2004 09:33 PM
mail() is not sending email on localhost SMTP anshul PHP How-To 5 August 4th, 2004 07:45 AM
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



All times are GMT -4. The time now is 03:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.