Wrox Programmer Forums
|
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 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 May 29th, 2007, 12:40 PM
Authorized User
 
Join Date: Sep 2006
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("[email protected]", 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

 
Old May 29th, 2007, 02:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.
 
Old June 7th, 2007, 01:56 PM
Authorized User
 
Join Date: Sep 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK Cheers

Figured out my problem








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





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