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. Mailbox unavailable exception plz help!!!

Mailbox unavailable exception plz help!!!

Scheduled Pinned Locked Moved ASP.NET
sysadminhelpcsharpjavascriptcom
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.
  • J Offline
    J Offline
    jokerkachotabhai
    wrote on last edited by
    #1

    I am getting this error Mailbox unavailable. The server response was: 5.7.1 Unable to relay for niwant_gadgil@yahoo.co.in Following is the code which i have written : //////////////////////////////////////////////////////////////// protected void btnSubmit_Click(object sender, EventArgs e) { if (tbUsrName.Text == "") { Response.Write("<script language='javascript'>alert(\"UserName is Blank...\");</script>"); } else { try { string dbString = ConfigurationManager.ConnectionStrings["AppCon"].ConnectionString; SqlConnection sqlcon = new SqlConnection(dbString); sqlcon.Open(); SqlCommand sc = new SqlCommand("select usr_Email from usr_details where usr_ID = '" + tbUsrName.Text.ToString() + "'", sqlcon); SqlDataReader sqldr = sc.ExecuteReader(); if (sqldr.Read()) { string e_mail = sqldr["usr_Email"].ToString(); MailMessage msg = new MailMessage("noreplyadmin@learners21st.com", e_mail, "Password Recovery", "ur new password is 0a1b2c3d plz change it as soon as u log in"); SmtpClient mySmtp = new SmtpClient("localhost"); mySmtp.Send(msg); lblResult.Visible = true; lblResult.Text = "Submit occured"; } else { lblResult.Text = "No Such User Found........"; lblResult.Visible = true; } } catch (Exception ex) { lblResult.Visible = true; lblResult.Text = ex.Message; } } } NOTE : noreplyadmin@learners21st.com doesn't exist NOTE : I am not using ASPNETDB /////////////////////////////////////////////////////////// In web.config i hve included this section to post the mail <system.net> <mailSettings> <smtp> <network host="localhost" port="25" defaultCredentials="true"/> </smtp> </mailSettings> </system.net> How can i solve this plz help

    V 1 Reply Last reply
    0
    • J jokerkachotabhai

      I am getting this error Mailbox unavailable. The server response was: 5.7.1 Unable to relay for niwant_gadgil@yahoo.co.in Following is the code which i have written : //////////////////////////////////////////////////////////////// protected void btnSubmit_Click(object sender, EventArgs e) { if (tbUsrName.Text == "") { Response.Write("<script language='javascript'>alert(\"UserName is Blank...\");</script>"); } else { try { string dbString = ConfigurationManager.ConnectionStrings["AppCon"].ConnectionString; SqlConnection sqlcon = new SqlConnection(dbString); sqlcon.Open(); SqlCommand sc = new SqlCommand("select usr_Email from usr_details where usr_ID = '" + tbUsrName.Text.ToString() + "'", sqlcon); SqlDataReader sqldr = sc.ExecuteReader(); if (sqldr.Read()) { string e_mail = sqldr["usr_Email"].ToString(); MailMessage msg = new MailMessage("noreplyadmin@learners21st.com", e_mail, "Password Recovery", "ur new password is 0a1b2c3d plz change it as soon as u log in"); SmtpClient mySmtp = new SmtpClient("localhost"); mySmtp.Send(msg); lblResult.Visible = true; lblResult.Text = "Submit occured"; } else { lblResult.Text = "No Such User Found........"; lblResult.Visible = true; } } catch (Exception ex) { lblResult.Visible = true; lblResult.Text = ex.Message; } } } NOTE : noreplyadmin@learners21st.com doesn't exist NOTE : I am not using ASPNETDB /////////////////////////////////////////////////////////// In web.config i hve included this section to post the mail <system.net> <mailSettings> <smtp> <network host="localhost" port="25" defaultCredentials="true"/> </smtp> </mailSettings> </system.net> How can i solve this plz help

      V Offline
      V Offline
      vinodkrebc
      wrote on last edited by
      #2

      pls put the host the local ip address like 192.168.0.54 instead of localhost and then try

      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