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 > BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 29th, 2007, 12:40 PM
Authorized User
 
Join Date: Sep 2006
Location: Mitcham, London, United Kingdom.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sending Confirmation email in the WroxShop

Hie

I am trying to figure out how the SendConfirmationMessage method of the Helpers class sends email.

    Dim theSubject As String = "Your order at The Batik Shop"
        Dim theMessage As String = My.Computer.FileSystem.ReadAllText _
          (AppConfiguration.ConfirmationMessageLocation)

        Dim mySmtpClient As New System.Net.Mail.SmtpClient
        theMessage = theMessage.Replace("##ShoppingCart##", _
                GetHtmlFromControl(myGridView))
        theMessage = theMessage.Replace("##OrderNumber##", orderId.ToString())
                mySmtpClient.Send("mail@art-wax.co.uk", emailAddress, theSubject, theMessage)

I am aware of how emailing works in asp.net but what i wanted to know is where the mySmtpClient.Send() is getting the TO: emailaddress.

Am i supposed to set it myself or the code is getting it from somewhere automatically,if so where.My understanding is that the email address is different for each user.

Thanks

  #2 (permalink)  
Old May 29th, 2007, 02:33 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Take a look at the method signature:

Public Shared Sub SendConfirmationMessage( _
   ByVal theShoppingCart As ShoppingCart, ByVal orderId As Integer, _
   ByVal emailAddress As String)

The SendConfirmationMessage method gets the emailAddress from the parameter of the method. So, the calling code should pass in a valid address.

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #3 (permalink)  
Old June 7th, 2007, 01:56 PM
Authorized User
 
Join Date: Sep 2006
Location: Mitcham, London, United Kingdom.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK Cheers

Figured out my problem



 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Sending EMAIL charleshua BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 16 September 3rd, 2008 12:27 AM
webshop email confirmation message Nick23 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 September 14th, 2007 03:43 PM
Email Confirmation Katachi Dreamweaver (all versions) 1 December 18th, 2005 07:19 AM
email confirmation and site principal identity seanmayhew BOOK: ASP.NET Website Programming Problem-Design-Solution 1 March 30th, 2005 09:10 AM
Sending Confirmation Mail shs BOOK: Beginning ASP.NET 1.0 1 August 14th, 2004 10:30 PM



All times are GMT -4. The time now is 12:39 AM.


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