Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. system.web.mail not found

system.web.mail not found

Scheduled Pinned Locked Moved Visual Basic
helpcsharphtmlvisual-studiocom
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    acecase
    wrote on last edited by
    #1

    Hey, This is my first post here so lemmy start with thanks to all the contributors here. I have learned allot from the code hosted here. My problem is with system.web.mail. When I try to import system.web.mail with (Imports System.Web.Mail) I get squiglys telling me that "namespace or type (mail) for imports system.web.mail cannot be found. I have searched both here and on msdn and found examples useing.. Imports System Imports System.Web.Mail and have try to copy/paiste them into visual studio as both windows application and console application and always get the error. Is it that my library is incomplete or has this namespace been replaced by something else or what? Thanks in advance for you're help EDIT: If it helps anyone to see what I meen here is a link to the namespace info on msdn. Also I should have mentioned that I tried calling smtpMail.send useing the full path (System.Web.Mail.smtpMail.send() ) and it still sais it doesn't exist. :mad: 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..

    C 1 Reply Last reply
    0
    • A acecase

      Hey, This is my first post here so lemmy start with thanks to all the contributors here. I have learned allot from the code hosted here. My problem is with system.web.mail. When I try to import system.web.mail with (Imports System.Web.Mail) I get squiglys telling me that "namespace or type (mail) for imports system.web.mail cannot be found. I have searched both here and on msdn and found examples useing.. Imports System Imports System.Web.Mail and have try to copy/paiste them into visual studio as both windows application and console application and always get the error. Is it that my library is incomplete or has this namespace been replaced by something else or what? Thanks in advance for you're help EDIT: If it helps anyone to see what I meen here is a link to the namespace info on msdn. Also I should have mentioned that I tried calling smtpMail.send useing the full path (System.Web.Mail.smtpMail.send() ) and it still sais it doesn't exist. :mad: 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..

      C Offline
      C Offline
      Charlie Williams
      wrote on last edited by
      #2

      Add a reference to System.Web in your project Charlie if(!curlies){ return; }

      A 1 Reply Last reply
      0
      • C Charlie Williams

        Add a reference to System.Web in your project Charlie if(!curlies){ return; }

        A Offline
        A Offline
        acecase
        wrote on last edited by
        #3

        I can import system.web and can also reference it from inside other classes etc. the squigly lines show up when I add .mail or when I try to use anything or these dudes (MailAttachment MailFormat MailPriority MailEncoding MailMessage SmtpMail ) I admit I am a vb.net newb but I have checked and rechecked my syntax and spelling etc even going as far as to copy and paste example code from msdn and even downloaded some project files useing the class and always get the squiggly lines and compile time errors. Its like it isn't there. Is there a way to download the full library? I'm guessing my library is incomplete or corrupted. I just installed a fresh visual studio .net enterprise archetect from an unopened retail box. (still in the plastic) For example I can start a new visual basic - console application and paiste the code directly from this msdn page and get the same problem. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmailsmtpmailclasstopic.asp 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..

        C 1 Reply Last reply
        0
        • A acecase

          I can import system.web and can also reference it from inside other classes etc. the squigly lines show up when I add .mail or when I try to use anything or these dudes (MailAttachment MailFormat MailPriority MailEncoding MailMessage SmtpMail ) I admit I am a vb.net newb but I have checked and rechecked my syntax and spelling etc even going as far as to copy and paste example code from msdn and even downloaded some project files useing the class and always get the squiggly lines and compile time errors. Its like it isn't there. Is there a way to download the full library? I'm guessing my library is incomplete or corrupted. I just installed a fresh visual studio .net enterprise archetect from an unopened retail box. (still in the plastic) For example I can start a new visual basic - console application and paiste the code directly from this msdn page and get the same problem. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmailsmtpmailclasstopic.asp 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..

          C Offline
          C Offline
          Charlie Williams
          wrote on last edited by
          #4

          The Imports keyword is only a coding shortcut. For example, adding Imports System.Windows.Forms at the top of your source code file allows you to type Dim myForm as New Form instead of Dim myForm as new System.Windows.Forms.Form If you want to use a class in an assembly that's not referenced by default, you have to add that reference manually. To do so, right click on the References folder in your project (in the Solution Explorer) and click Add Reference. Scroll down until you find the one you're looking for (System.Web in this case), double-click it and click OK. Now you can use any of the classes defined in that assembly in your code. Charlie if(!curlies){ return; }

          A 1 Reply Last reply
          0
          • C Charlie Williams

            The Imports keyword is only a coding shortcut. For example, adding Imports System.Windows.Forms at the top of your source code file allows you to type Dim myForm as New Form instead of Dim myForm as new System.Windows.Forms.Form If you want to use a class in an assembly that's not referenced by default, you have to add that reference manually. To do so, right click on the References folder in your project (in the Solution Explorer) and click Add Reference. Scroll down until you find the one you're looking for (System.Web in this case), double-click it and click OK. Now you can use any of the classes defined in that assembly in your code. Charlie if(!curlies){ return; }

            A Offline
            A Offline
            acecase
            wrote on last edited by
            #5

            Thank you very much. I actualy found my solution yesterday BUT that is exactly what I wasn't doing and you are the only person who responded and tried to help so I DO apriciate the help. This was my first application and as part of my course I was to write something that I felt was usefull while small and make myself find everything I needed to know to get it done. Not the usualy first exercise in a course but very usefull. I lurned allot of the basics and this way they will stick, since I spent so much time finding each. Again Thanks, Harley 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups