Last post May 13, 2006 12:05 AM by harsh_9999
May 12, 2006 03:02 AM|harsh_9999|LINK
I am using IBUYSPY (CommerceVBSDK) stater kit . How can we send order details in email (Html Format) to customer and to store owner after checkout. Please let me know this.
May 12, 2006 05:04 AM|doyle_am|LINK
Sending an e-mail using the .NET Framework 2.0 is so simple once you know how.
On my CSK site I place a call to an e-mail module in the ASPX page that recieves payment confirmation from PayPal, so as soon as the customer pays my site sends out a thank you e-mail.
Here's the basic VB code to send a HTML e-mail:
'Create a new mail message
Dim mail As
'Set the sender
mail.From = New System.Net.Mail.MailAddress("firstname.lastname@example.org",
'Add a new recipient
'Add youself as a BCC recipient
'Set the subject
mail.Subject = "Subject"
'Enable HTML body content
mail.IsBodyHtml = True
'Set the HTML body
mail.Body = "<h1>This is a HTML e-mail body</h1><p>Do some fancy stuff here...</p>"
'Add an alternate view for mail clients that only support plain text
mail.AlternateViews.Add(New System.Net.Mail.AlternateView("This will show when HTML is disabled",
'Create a new SMTP client using the local machine and default port
Dim smtp As
'Send the mail out
Obviously that's just a quick bit of code so you will need to do the usual error checking along the way etc.
Personally I've found that sending HTML e-mails involves a lot of luck really because of how the different clients and webclients render it. For that reason I keep a log of the e-mail sent in SQL and provide a clear link at
the top of all HTML so that if the customer has trouble reading the e-mail then can click the link to view it online.
If all goes well I'm going to make my addon available to all once I know it's solid. I know it's not rocket science to do but if there's something out there already why reinvent the wheel [:)]
If you have any questions I'm happy to help,
Web hosting the way YOU want it
May 13, 2006 12:05 AM|harsh_9999|LINK
Hi Andy Doyle,
I am very much grateful to you for sending code.[:)] But may question is, how can we display ORDER ITEMS of shopping cart in email. When user click on checkout button after shopping, automatically a email will be sent to customer and site owner with ORDERED
ITEMS details (like invoice).