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. Web Development
  3. ASP.NET
  4. SMTP Mail

SMTP Mail

Scheduled Pinned Locked Moved ASP.NET
comtutorialquestion
5 Posts 3 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.
  • P Offline
    P Offline
    payback
    wrote on last edited by
    #1

    Hi, Can anyone tell me how to send smtp email from my machine.i'm doing it as below .It executes fine but i recieve no email.plz let me know what else i have to do. Dim objMM As New MailMessage() objMM.To = "one_dcsian@yahoo.com" objMM.From = "one_dcsian@yahoo.com" objMM.BodyFormat = MailFormat.Text objMM.Priority = MailPriority.Normal objMM.Subject = "Hello there!" objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?" Dim SmtpMail As Web.Mail.SmtpMail SmtpMail.SmtpServer = "localhost" SmtpMail.Send(objMM) payback

    P R 2 Replies Last reply
    0
    • P payback

      Hi, Can anyone tell me how to send smtp email from my machine.i'm doing it as below .It executes fine but i recieve no email.plz let me know what else i have to do. Dim objMM As New MailMessage() objMM.To = "one_dcsian@yahoo.com" objMM.From = "one_dcsian@yahoo.com" objMM.BodyFormat = MailFormat.Text objMM.Priority = MailPriority.Normal objMM.Subject = "Hello there!" objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?" Dim SmtpMail As Web.Mail.SmtpMail SmtpMail.SmtpServer = "localhost" SmtpMail.Send(objMM) payback

      P Offline
      P Offline
      Paul Watson
      wrote on last edited by
      #2

      Dim SmtpMail As Web.Mail.SmtpMail My VB.NET is rusty but I don't think you need to do this as Send is a static method. So you don't need to instantiate the class. In C# I just set the SmtpServer and then use the Send method. If that does not work but without .NET errors then your localhost probably has not been setup correctly. regards, Paul Watson Bluegrass South Africa Chris Maunder wrote: "I'd rather cover myself in honey and lie on an ant's nest than commit myself to it publicly." Jon Sagara replied: "I think we've all been in that situation before." Crikey! ain't life grand?

      P 1 Reply Last reply
      0
      • P Paul Watson

        Dim SmtpMail As Web.Mail.SmtpMail My VB.NET is rusty but I don't think you need to do this as Send is a static method. So you don't need to instantiate the class. In C# I just set the SmtpServer and then use the Send method. If that does not work but without .NET errors then your localhost probably has not been setup correctly. regards, Paul Watson Bluegrass South Africa Chris Maunder wrote: "I'd rather cover myself in honey and lie on an ant's nest than commit myself to it publicly." Jon Sagara replied: "I think we've all been in that situation before." Crikey! ain't life grand?

        P Offline
        P Offline
        payback
        wrote on last edited by
        #3

        ok ur rite. but that was just declaration not instantiation. any way i tried after removing that but nothing.any other suggestion? anyone knows about it??? Best Regards PayBack

        P 1 Reply Last reply
        0
        • P payback

          ok ur rite. but that was just declaration not instantiation. any way i tried after removing that but nothing.any other suggestion? anyone knows about it??? Best Regards PayBack

          P Offline
          P Offline
          Paul Watson
          wrote on last edited by
          #4

          There are plenty of articles on it right here on CP and here is one by Isaac Sasson which should help. regards, Paul Watson Bluegrass South Africa Chris Maunder wrote: "I'd rather cover myself in honey and lie on an ant's nest than commit myself to it publicly." Jon Sagara replied: "I think we've all been in that situation before." Crikey! ain't life grand?

          1 Reply Last reply
          0
          • P payback

            Hi, Can anyone tell me how to send smtp email from my machine.i'm doing it as below .It executes fine but i recieve no email.plz let me know what else i have to do. Dim objMM As New MailMessage() objMM.To = "one_dcsian@yahoo.com" objMM.From = "one_dcsian@yahoo.com" objMM.BodyFormat = MailFormat.Text objMM.Priority = MailPriority.Normal objMM.Subject = "Hello there!" objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?" Dim SmtpMail As Web.Mail.SmtpMail SmtpMail.SmtpServer = "localhost" SmtpMail.Send(objMM) payback

            R Offline
            R Offline
            Rocky Moore
            wrote on last edited by
            #5

            I use http://sourceforge.net/projects/opensmtp-net/[^] for all my sites. Works great! Rocky <>< www.HintsAndTips.com www.GotTheAnswerToSpam.com

            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