Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 26th, 2007, 04:38 AM
Authorized User
 
Join Date: Oct 2007
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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("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?
Reply With Quote
  #2 (permalink)  
Old October 27th, 2007, 03:23 AM
Imar's Avatar
Wrox Author
Points: 67,271, Level: 100
Points: 67,271, Level: 100 Points: 67,271, Level: 100 Points: 67,271, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,227
Thanks: 66
Thanked 1,414 Times in 1,394 Posts
Default

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?
Reply With Quote
  #3 (permalink)  
Old October 29th, 2007, 03:52 AM
Authorized User
 
Join Date: Oct 2007
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

Reply With Quote
  #4 (permalink)  
Old October 29th, 2007, 02:24 PM
Imar's Avatar
Wrox Author
Points: 67,271, Level: 100
Points: 67,271, Level: 100 Points: 67,271, Level: 100 Points: 67,271, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,227
Thanks: 66
Thanked 1,414 Times in 1,394 Posts
Default

Take a look here: http://p2p.wrox.com/topic.asp?TOPIC_ID=66126

Have you set IsBodyHtml??

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
Reply With Quote
  #5 (permalink)  
Old October 30th, 2007, 03:02 AM
Authorized User
 
Join Date: Oct 2007
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
  #6 (permalink)  
Old October 30th, 2007, 04:57 PM
Imar's Avatar
Wrox Author
Points: 67,271, Level: 100
Points: 67,271, Level: 100 Points: 67,271, Level: 100 Points: 67,271, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,227
Thanks: 66
Thanked 1,414 Times in 1,394 Posts
Default

It's a property of the MailMessage object that you need to set to True.

Can you post your code?

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
Reply With Quote
  #7 (permalink)  
Old October 31st, 2007, 03:12 AM
Authorized User
 
Join Date: Oct 2007
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I allready have that set to true :S

      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

      mySmtpClient.Send(myMessage)
    End If
  End Sub

Reply With Quote
  #8 (permalink)  
Old October 31st, 2007, 03:20 PM
Imar's Avatar
Wrox Author
Points: 67,271, Level: 100
Points: 67,271, Level: 100 Points: 67,271, Level: 100 Points: 67,271, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,227
Thanks: 66
Thanked 1,414 Times in 1,394 Posts
Default

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
Reply With Quote
  #9 (permalink)  
Old October 31st, 2007, 05:01 PM
Authorized User
 
Join Date: Oct 2007
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just have this in the Confirm Message:

 
Quote:
quote:<body>
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>
Reply With Quote
  #10 (permalink)  
Old October 31st, 2007, 05:06 PM
Imar's Avatar
Wrox Author
Points: 67,271, Level: 100
Points: 67,271, Level: 100 Points: 67,271, Level: 100 Points: 67,271, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,227
Thanks: 66
Thanked 1,414 Times in 1,394 Posts
Default

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
mail function remo Beginning PHP 0 July 16th, 2007 05:45 AM
mail function sunsetbay Beginning PHP 5 July 3rd, 2005 08:59 PM
can't seem to get the mail() function to work Graham76 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 5th, 2004 01:59 PM
mail () function Mark200408 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 September 30th, 2004 07:59 AM



All times are GMT -4. The time now is 11:48 PM.


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