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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. sending email through asp.net 1.1

sending email through asp.net 1.1

Scheduled Pinned Locked Moved ASP.NET
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.
  • A Offline
    A Offline
    Atif Ali Bhatti
    wrote on last edited by
    #1

    hey i've folling code running but there is an error : Imports DotNetOpenMail Imports DotNetOpenMail.Logging Imports DotNetOpenMail.Encoding Imports DotNetOpenMail.Resources Imports DotNetOpenMail.SmtpAuth Dim emailMessages As New EmailMessage emailMessages.FromAddress = New EmailAddress("atif.kabhikabhi@gmail.com", "Atif") emailMessages.AddToAddress(New EmailAddress("kabhikabhi.atif@gmail.com")) emailMessages.Subject = "Salam" emailMessages.HtmlPart = New HtmlAttachment("

    Write Down some BODY-Text here

    ") Dim smtpservv As SmtpServer smtpservv = New SmtpServer("smtp.gmail.com", 465) smtpservv.SmtpAuthToken = New SmtpAuthToken("atif.kabhikabhi@gmail.com", "aasmaan") emailMessages.ContentType = "TEXT/HTML" emailMessages.Send(smtpservv) Response.Write("Email Sent Successfully") n the error is "there is no such host" can any buddy help me thnx in advance..

    K 1 Reply Last reply
    0
    • A Atif Ali Bhatti

      hey i've folling code running but there is an error : Imports DotNetOpenMail Imports DotNetOpenMail.Logging Imports DotNetOpenMail.Encoding Imports DotNetOpenMail.Resources Imports DotNetOpenMail.SmtpAuth Dim emailMessages As New EmailMessage emailMessages.FromAddress = New EmailAddress("atif.kabhikabhi@gmail.com", "Atif") emailMessages.AddToAddress(New EmailAddress("kabhikabhi.atif@gmail.com")) emailMessages.Subject = "Salam" emailMessages.HtmlPart = New HtmlAttachment("

      Write Down some BODY-Text here

      ") Dim smtpservv As SmtpServer smtpservv = New SmtpServer("smtp.gmail.com", 465) smtpservv.SmtpAuthToken = New SmtpAuthToken("atif.kabhikabhi@gmail.com", "aasmaan") emailMessages.ContentType = "TEXT/HTML" emailMessages.Send(smtpservv) Response.Write("Email Sent Successfully") n the error is "there is no such host" can any buddy help me thnx in advance..

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      I would guess that it is having trouble resolving the smtp.gmail.com, so you might need to put in the IP address. The port is also not that standard smtp port. Normally it is 25. Hope that helps. Ben

      A 1 Reply Last reply
      0
      • K kubben

        I would guess that it is having trouble resolving the smtp.gmail.com, so you might need to put in the IP address. The port is also not that standard smtp port. Normally it is 25. Hope that helps. Ben

        A Offline
        A Offline
        Atif Ali Bhatti
        wrote on last edited by
        #3

        hey thnx but after making changes the only thing changes is the error. now i get the error "The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available "

        K K 2 Replies Last reply
        0
        • A Atif Ali Bhatti

          hey thnx but after making changes the only thing changes is the error. now i get the error "The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available "

          K Offline
          K Offline
          Kasson
          wrote on last edited by
          #4

          Hi, the SMTP mail is blocked by the virus scan. so follow this step and check it out . go to VirusScan Console - Right-click Access Protection - Click "Properties" - Go to Port-Blocking tab - Select Rule: "Prevent mass mailing worms from sending mail" - Click Edit (in order to edit this rule) - Add "aspnet_wp.exe" to the exclusion list Other products such as Norton and other antiviral or firewall software may cause the same issue, but I'll bet the underlying issue is the same. Hope this helps others out there.

          With Regards, Sakthi

          1 Reply Last reply
          0
          • A Atif Ali Bhatti

            hey thnx but after making changes the only thing changes is the error. now i get the error "The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available "

            K Offline
            K Offline
            kubben
            wrote on last edited by
            #5

            Not sure what the error means, but I am guessing you need to find another smtp server to send your email from. Ben

            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