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 .
Oke i'm now making a new topic for the search function
but the same question
on the webshop part 9
i want to send an email to the customer and to me.
for customers is in the add on
but to a fixed email adres not?
ive edited the email functions to the webpage
all the things
but the customer doesn't gets a email?
I've checked with a breakpoint
i've set a breakpoint here:
mySmtpClient.Send("stage1@itasc.nl", emailAddress, theSubject, theMessage)
And when i debug it when i press the finalize order button it shows me that breakpoint
i'm not really sure what i did wrong?
is it maybe because of the email adres?
First, make sure that emailAddress contains a valid e-mail address.
Also, make sure your system is set up for sending e-mails. You either need an SMTP server on your local host (not recommended for security reasons) or need to configure a web server in the web.config file.
Oke it works i'm feeling such a noobie now
just forgot to define the server.
i'm pretty sure this is a dumb mistake but i'm sending the .txt mail but in every program (hotmail/outlook) he only show the html (it all works though) but he doesn't show the layout?
Dim mySmtpClient As SmtpClient = New SmtpClient()
Dim myMessage As MailMessage = New MailMessage("chris_bongers@hotmail.Com", "chris_bongers@hotmail.Com", subject, errorMessage.ToString())
myMessage.IsBodyHtml = True
Beste klant,<br /><br />
Bedankt voor je bestelling bij Itasc. Je bestelnummer is,
<b>##OrderNumber##</b><br /><br />
Hieronder vind je een lijst met producten die je bestelt hebt.
De producten zullen worden verstuurd zodra we het geld binnen hebben.
<br /><br />
##ShoppingCart##
<br /><br />
Bedankt,
<br /><br />
Itasc Webshop team.
</body>
Try removing the <body> tags, make sure IsBodyHtml is really set to True before you send the message, make sure your message really contains HTML (set a breakpoint to find out) and make sure you have an HTML compliant mail reader. AFAIK, when all four are true, you should see an HTML formatted message.