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. Unable to send mail by using ASP.Net 2.0

Unable to send mail by using ASP.Net 2.0

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netcomsysadminhelp
2 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.
  • D Offline
    D Offline
    DineshSharma
    wrote on last edited by
    #1

    Hello Frends I m using ASP.Net 2.0 and trying to send mail but its showing me error ... Error Message is --Mailbox unavailable. The server response was: 5.7.1 Unable to relay for dineshsharmain@gmail.com my code is -- in web.config - and in .CS File - try { MailMessage message = new MailMessage(); message.From = new MailAddress(txtEMailFrom.Text); message.To.Add(new MailAddress("dineshsharmain@gmail.com")); message.Subject = txtSubject.Text; message.Body = txtMsg.Text; SmtpClient client = new SmtpClient(); client.Send(message); lblMsg.Text = DeliveryNotificationOptions.OnSuccess.ToString(); } catch (SmtpException ex) { lblMsg.Text = ex.Message + " " + ex.InnerException; } Thanx Dinesh Sharma

    S 1 Reply Last reply
    0
    • D DineshSharma

      Hello Frends I m using ASP.Net 2.0 and trying to send mail but its showing me error ... Error Message is --Mailbox unavailable. The server response was: 5.7.1 Unable to relay for dineshsharmain@gmail.com my code is -- in web.config - and in .CS File - try { MailMessage message = new MailMessage(); message.From = new MailAddress(txtEMailFrom.Text); message.To.Add(new MailAddress("dineshsharmain@gmail.com")); message.Subject = txtSubject.Text; message.Body = txtMsg.Text; SmtpClient client = new SmtpClient(); client.Send(message); lblMsg.Text = DeliveryNotificationOptions.OnSuccess.ToString(); } catch (SmtpException ex) { lblMsg.Text = ex.Message + " " + ex.InnerException; } Thanx Dinesh Sharma

      S Offline
      S Offline
      Suresh Pirsquare
      wrote on last edited by
      #2

      Review this link:- http://www.codecomments.com/ASP_.NET/message857135.html[^] :) Thanks and regards, Suresh Dayma

      Everything Is Possible!

      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