Announcement

Collapse
No announcement yet.

Mailbox unavailable. No such user here.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mailbox unavailable. No such user here.

    I originally posted this in the wrong forum, so apologies for duplication.

    Does anyone have any advice on how to get emails relayed from the Webhosting UK Mail Server?

    I have setup an ASP.net 3.5 website which is hosted on Webhosting UK. In development I have used ASP controls (<asp: PasswordRecovery>) to allow users to be sent a new password via email.

    The solution works perfectly on my development server, but I'm having problems once it's deployed to Web Hosting UK.

    I have created an email account on my domain using DotNetPanel which i can see sends and receives emails OK.

    When my site tries to send an email TO the user registered on my domain everything works OK.

    However, when the website tries to send email TO an external email address, i get the following error:

    "Mailbox unavailable. The server response was: <[email protected]> No such user here

    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.SmtpFailedRecipientException: Mailbox unavailable. The server response was: <[email protected]> No such user here"

    Investigating this issue suggests that the mail server is restricted to prevent spamming, by disabling relaying of emails. I therefore assume that there must be a setting in my ASP code which can reassure the mail server that my email is genuine. Or is there something else I have got wrong?

    Here is the code in my website Web.config file for mail setting:

    <system.net>
    <mailSettings>
    <smtp>
    <network host="mail.survey.juliabowes.com" port="25" userName="[email protected]" password="******" />
    </smtp>
    </mailSettings>
    </system.net>


    Has anyone any advice on how to get round this problem?

  • #2
    Originally posted by Tasmin96 View Post

    Here is the code in my website Web.config file for mail setting:

    <system.net>
    <mailSettings>
    <smtp>
    <network host="mail.survey.juliabowes.com" port="25" userName="[email protected]" password="******" />
    </smtp>
    </mailSettings>
    </system.net>


    Has anyone any advice on how to get round this problem?
    Your web.config is correct, In order to relay you need to authenticate your email. You are using the correct method, Can you kindly let me know the URL and PM me a user name and password to login to your restricted Area to run a couple of tests please ?

    Regards,
    Gerrad

    Comment


    • #3
      Partial Solution/Workround

      I have found a way round the problem now by forcing a new smtp send using the SendingMail event of the PasswordRecovery control.

      Clearly the Webhosting UK Mail server was relaying the email correctly, provided it was instructed correctly, which I guess the PasswordRecovery control in ASP.NET wasn't doing.

      Here is my v.simple code which has got round the problem.

      Protected Sub PasswordRecovery1_SendingMail(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MailMessageEventArgs) Handles PasswordRecovery1.SendingMail
      Dim thisSMTP As New SmtpClient
      thisSMTP.Send(e.Message)
      e.Cancel = True
      End Sub
      This seems to do what I assumed the control was doing anyway, so I'm not exactly sure how this has fixed the problem, but i certainly dont get the error any longer and the email arrives at the destination, so I'm happy (apart from wasting so much time trying to find out what i was doing wrong)

      Thanks to those who looked at my post and to Gerrard for trying to help me find a resolution.

      Comment


      • #4
        Thank you for posting out the solution to the email relay problem, it'd help others for sure..
        Kind regards,
        Jack Daniel.

        Cloud Hosting || Managed Dedicated Server || Webhosting UK Knowledgebase

        Comment

        Working...
        X