p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 (http://p2p.wrox.com/forumdisplay.php?f=252)
-   -   Sending Confirmation email in the WroxShop (http://p2p.wrox.com/showthread.php?t=58509)

Tawanda May 29th, 2007 12:40 PM

Sending Confirmation email in the WroxShop

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 _

        Dim mySmtpClient As New System.Net.Mail.SmtpClient
        theMessage = theMessage.Replace("##ShoppingCart##", _
        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.


Imar May 29th, 2007 02:33 PM

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 Spaanjaars
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.

Tawanda June 7th, 2007 01:56 PM

OK Cheers

Figured out my problem

All times are GMT -4. The time now is 07:41 PM.

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