Mailbox unavailable.

Discussion in 'Site Programming, Development and Design' started by Nfurman, Mar 3, 2010.

  1. Hello. My code is:

    Code:
    MailMessage message = new MailMessage();
                    MailMessage messageToUser = new MailMessage();
    
                    //Assign the MessageFromEmailID i.e. sender's EmailID
    
                    message.From = new MailAddress(tbEmail.Text);
                    messageToUser.From = new MailAddress(tbEmail.Text);
    
                    //Add the MessageToEmailID i.e. recipient's EmailID
    
                    message.To.Add(new MailAddress("nathan@multicode.co.il"));
                    messageToUser.To.Add(new MailAddress(tbEmail.Text));
    
                    //Assign the subject of the email
    
                    message.Subject = "Onset LTD | Feedback";
                    messageToUser.Subject = "Confirmation Letter";
                    message.IsBodyHtml = true;
                    messageToUser.IsBodyHtml = true;
    
                    //Assign the body of the email i.e. the message to be sent
    
                    message.Body = "Hello! This is the smtp-daemon who has delivered new feedback message.<br><hr><br><b>Name:</b><br>" + tbName.Text + "<br><b>Company:</b><br>" + tbCompany.Text + "<br><b>Email</b><br>" + tbEmail.Text + "<br><b>Phone#:</b><br>" + tbPhone.Text + "<br><b>Address:</b><br>" + tbAddressLine1.Text + " " + tbAddressLine2.Text + "<br><b>Country:</b><br>" + Country.Text + "<br><b>State:</b><br>" + State.Text + "<br><b>Message:</b><br>" + tbMessage.Text + "<br><br><hr>To answer to this message you can just use reply function in your mail agent software.";
                    messageToUser.Body = "Hello Dear " + tbName.Text + "<br><br>This is an automatic e-mail confirming your request  has reached our system. We are making the best efforts in order to reply to your query with in one business day<br><br>It depends on the content of your message we will contact you asap.<br><br><hr>Best Regards,<br>Onset Systems Engineering LTD";
    
    
                    //Create an object of SmtpClient by passing ur SMTP Server name and SMTP port to be used. By default port 25 can be used.
    
                   
                    SmtpClient objSMTP = new SmtpClient(OnsetConfig.MailServer);
                    objSMTP.Credentials = new NetworkCredential(OnsetConfig.MailUsername, OnsetConfig.MailPassword);
                    objSMTP.UseDefaultCredentials = false;
    
                    //Call the Send  method of SmtpClient object and pass the MailMessage object, while will finally send the email message to the recipient's emailID
    
                    objSMTP.Send(message);
                    objSMTP.Send(messageToUser);
    
    I'm getting exeption Mailbox unavailable. The server response was: <nfurman@walla.co.il> No such user here

    But anyway getting the letters into my mailbox. What to do?
     
  2. Also, I'm getting greylisted. What to do?
     
  3. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015

Share This Page