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

October 26th, 2007, 04:38 AM
|
|
Authorized User
|
|
Join Date: Oct 2007
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Mail function
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(" [email protected]", 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?
|
|

October 27th, 2007, 03:23 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
Cheers,
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
While typing this post, I was listening to: Spargi D'Amaro Pianto (Donizetti) by Maria Callas (Track 15 from the album: Maria Callas: The Voice Within the Heart) What's This?
|
|

October 29th, 2007, 03:52 AM
|
|
Authorized User
|
|
Join Date: Oct 2007
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|
|

October 30th, 2007, 03:02 AM
|
|
Authorized User
|
|
Join Date: Oct 2007
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i'm sorry but where do i put the IsBodyHtml tag?
i only have that in the global.asax file when a error is tossed.
|
|

October 31st, 2007, 03:12 AM
|
|
Authorized User
|
|
Join Date: Oct 2007
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I allready have that set to true :S
Dim mySmtpClient As SmtpClient = New SmtpClient()
Dim myMessage As MailMessage = New MailMessage(" [email protected]", " [email protected]", subject, errorMessage.ToString())
myMessage.IsBodyHtml = True
mySmtpClient.Send(myMessage)
End If
End Sub
|
|

October 31st, 2007, 03:20 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Then it should work. Does errorMessage contain valid HTML? E.g. HTML you would normally place between the <body> tags?
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
|
|

October 31st, 2007, 05:01 PM
|
|
Authorized User
|
|
Join Date: Oct 2007
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I just have this in the Confirm Message:
Quote:
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>
|
|
|

October 31st, 2007, 05:06 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
Imar
BTW: Besteld is with a d not a t.... ;)
---------------------------------------
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
|
|
 |