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 - error in asp.net

Sending email - error in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdesignsysadmindata-structures
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.
  • A Offline
    A Offline
    ashok techxygen
    wrote on last edited by
    #1

    Hi all, I m getting the below error page in my site when i send mail to an invalid email id ( i.e recipient email address does not exist. ). If suppose i gave the correct available email ID, it works fine... i ve changed in web.config mail settings and in mail sending message , but i cant get correct output. ERROR page: ========== [SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)] Server Error in '/' Application. Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.Mail.SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1) Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)] System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) +881192 System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from) +39 System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) +95 System.Net.Mail.SmtpClient.Send(MailMessage message) +2004 App_Code.Email.MailSender(String sendFrom, String sendTo, String sendSubject) +110 App_Code.Email.EmailThisFriend(ArrayList objMailContent) +457 EmailThisPage.btnSubmit_Click(Object sender, EventArgs e) +458 System.Web.UI.ImageClickEventHandler.Invoke(Object sender, ImageClickEventArgs e) +0 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +86 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI

    S 1 Reply Last reply
    0
    • A ashok techxygen

      Hi all, I m getting the below error page in my site when i send mail to an invalid email id ( i.e recipient email address does not exist. ). If suppose i gave the correct available email ID, it works fine... i ve changed in web.config mail settings and in mail sending message , but i cant get correct output. ERROR page: ========== [SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)] Server Error in '/' Application. Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.Mail.SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1) Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)] System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) +881192 System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from) +39 System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) +95 System.Net.Mail.SmtpClient.Send(MailMessage message) +2004 App_Code.Email.MailSender(String sendFrom, String sendTo, String sendSubject) +110 App_Code.Email.EmailThisFriend(ArrayList objMailContent) +457 EmailThisPage.btnSubmit_Click(Object sender, EventArgs e) +458 System.Web.UI.ImageClickEventHandler.Invoke(Object sender, ImageClickEventArgs e) +0 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +86 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI

      S Offline
      S Offline
      SeMartens
      wrote on last edited by
      #2

      Okay, so everthing is fine. Just catch the exception where you send the mail and display a better error message to the user.

      It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

      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