Trouble using System.Web.Mail;

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fuzz13
    New Member
    • Jun 2010
    • 110

    #1

    Trouble using System.Web.Mail;

    I'm trying to begin working on a program that emails using the SmtpMail class but in the example text provided by msdn they use System.Web.Mail ; I added the code verbatim to a console application and the system.web.mail ; is giving me an error saying:
    Code:
    Error	1	The type or namespace name 'Mail' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
    I am confused why Mail is not found in the namespace System.Web? I am using VS2010 professional if that makes a difference. In the threads I'm reading about this it keeps referencing windows 2000 which is obviously older and I know things continuously change with new versions of windows and VS. I'm just curious what I should do at this point?

    Thanks for any suggestions.
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    Hey, I just learned how to use this the other day! :D Though it was in the System.Net.Mail namespace.

    Is that the one you're looking for? I dont' see a System.Web.Mail namespace in my references list.

    Comment

    • Fuzz13
      New Member
      • Jun 2010
      • 110

      #3
      Yes that is the one. Turns out they updated to system.net.mail ; from system.web.mail when they went to Net 2.0, thank you for your reply :)

      Comment

      Working...