Mailbox unavailable.

Discussion in 'Site Programming, Development and Design' started by ngiotta, Mar 29, 2010.

  1. Hi,

    I've been through all of the forums, KB posts, etc. Can't seem to figure this one out.... Everything I try results in:

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

    I'm deploying a "store bought" site for a client and it was unfortunately coded in C#... I can read pig latin just fine, and it seems like it's ok... Anyhow, the code I have is:

    Code:
            MailMessage message = new MailMessage();
            message.To.Add(email);
            if(!String.IsNullOrEmpty(Mail.WebmasterEmail))
                message.Bcc.Add(Mail.WebmasterEmail);
            message.From = new MailAddress(FormEmail, Global.CompanyName);
            message.Subject = "Information Request Confirmation";
            message.IsBodyHtml = true;
            message.Body = body.ToString();
    
            ///Tried mail.mydomain.com here as well. that refuses connection.
            SmtpClient smtp = new SmtpClient("m01.internetmailserver.net");
            NetworkCredential Credentials = new NetworkCredential("[email protected]", "password");
            smtp.Credentials = Credentials;
            smtp.Send(message); 
    
    Any help would be greatly appreciated. Thanks!
     
  2. Ray

    Ray

    Are you passing the correct smtp authentication?

    ---("[email protected]", "password");

    Every new email account will have a postmaster account. You cannot delete this account. You can use this postmaster account to log into the smtp server.
     
  3. Yes, I triple-checked it. I have logged into the webmail admin and set the password. Those are the credentials I'm using.
     
  4. Ray

    Ray

    Make sure the email address you are sending to is a valid and active email address.

    Base off your example code you have some variables being passed. For now as a test I suggest you do not pass any variable and hard code it in.

    To make it simple as a test created a simple .net script that sends out email. Make sre no variables are pass and everything is hard coded in.
     
  5. Yes, the email address it is sending to is the same that I use every day. It is a gmail address if that helps any.
     
  6. Ray

    Ray

    Like I said the best test right now is to create a simple .net script to send out email and do not pass any variables.

    I can only go from your coding and base of the example you given it looks like you are trying to hide some things to keep your email addresses safe so I am doing alot of assuming on my end.

    So I am assuming because you are using m01.internetmailserver.net that you are generally not using or email server but you would like to setup your web page to send email through our smtp server.

    Generally we do not advise this because of potential conflicts but if you are savy enough then you can still program to do this.

    But if this is the case then the smtp login is the full email address. And the password is the password associated to that email address on our email server. Some people get confused because they are using another email server not our own. They have the password setup for that pop account not realizing that we have our own email server and the password to that pop account maybe different.

    Like I said this is all assumption on my part and things that you may want to consider and check.
     
  7. Ray,

    Thanks for the reply. I have checked that the mail credentials I'm passing are correct, so I've canceled that out of the equation. I have also recreated a simply mail script that works on every other host I've used in the past in my native VB language. Still no luck.

    Code:
    Public Sub SendEmail(ByVal sender As Object, ByVal e As EventArgs)
            Dim message As New MailMessage()
            message.To.Add("[email protected]")
            message.From = New MailAddress("[email protected]", "Me")
            message.Subject = "Information Request Confirmation"
            message.IsBodyHtml = True
            message.Body = "TEST!"
    
            Dim smtp As New SmtpClient
            Dim Credentials As New NetworkCredential("[email protected]", "mypassword")
            smtp.UseDefaultCredentials = False
            smtp.Credentials = Credentials
            'tried mail.mydomain.com here too...
            smtp.Host = "smtp.mydomain.com"
            smtp.DeliveryMethod = SmtpDeliveryMethod.Network
            smtp.Port = 25
            smtp.Send(message)
    End Sub
    Using this code, I'm getting "No connection could be made because the target machine actively refused it 96.31.35.30:25"

    Not really sure what's wrong...
     
  8. Nevermind. I found the bogey. The smtp server needed to be m02.internetmailserver.net instead of all of the other combos I tried.

    Thanks.
     
  9. Glad you worked it out, and thanks for following up.
     

Share This Page