Problems With smartmalier

Discussion in 'Email' started by Dustin, May 16, 2014.

  1. Took over a site using asp.net and being hosted on Winhost and it uses smartmailer, Did something stupid and erased it thinking the client had a gdomain for email, found it was not and when I re enabled the account I found out it erases all setting I have not changed anything in the source code but now I am getting a unhandled exception,

    An exception of type 'System.Net.Mail.SmtpFailedRecipientException' occurred in System.dll but was not handled in user code
    Additional information: Mailbox unavailable. The server response was: No such user here

    I know its something I messed up in the smartmailer settings, Please help I dont know alot of aspx and .net more versed in php, by the way it is built on 4.0 framework..

    and this is the script....

    Code:
     sendInbox();
            sendReceipt();
            confirmPanel();
            pnlReserve.Visible = false;
            pnlConfirm.Visible = true;
        }
    
       public void sendInbox()
        {
            string fromName = txtFirstName.Text + " " + txtLastName.Text;
    
            MailMessage mail = new MailMessage();
            mail.To.Add("[email protected]");
            //mail.CC.Add("[email protected]");
            mail.From = new MailAddress(txtEmail.Text, fromName.ToString());
            mail.Subject = "CST: Book a Tour";
            string mailBody = "<br><br><table><tr><td width=150>Guest</td><td>" + txtFirstName.Text + "&nbsp;&nbsp;" + txtLastName.Text + "</td></tr><tr><td>Phone</td><td>" + txtPhone.Text + "&nbsp;&nbsp;&nbsp;ext.&nbsp;" + txtExtension.Text + "</td></tr><tr><td>How many people</td><td>" + txtPartySize.Text + "</td></tr><tr><td>Date/Time</td><td>" + DateTime.Parse(txtDate.Text).ToLongDateString() + "&nbsp;&nbsp;&nbsp;&nbsp;" + daTime.Text + "</td></tr><tr><td>Tour</td><td>" + drpTour.Text + " </td></tr></table>";
            mail.Body = mailBody;
            mail.IsBodyHtml = true;
          
    
    
            SmtpClient smtp = new SmtpClient();
            smtp.Send(mail);
            mail.Dispose();
        }
    
        public void sendReceipt()
        {
            //create the mail message
            MailMessage mail = new MailMessage();
    
            //set the addresses
            mail.From = new MailAddress("[email protected]", "Chicago Segway Tour");
            mail.To.Add(txtEmail.Text);
    
            //set the content
            mail.Subject = "Book a Tour Request: " + DateTime.Parse(txtDate.Text).ToLongDateString() + " at " + daTime.Text;
    
        
            //add the views
            mail.AlternateViews.Add(plainView);
            mail.AlternateViews.Add(htmlView);
    
    
            //send the message
            SmtpClient smtp = new SmtpClient();
            smtp.Send(mail);
            mail.Dispose(); ;
    
        }
    
        public void confirmPanel()
        {
            lblName.Text = txtFirstName.Text;
            lblDate.Text = txtDate.Text;
            lblEmail.Text = txtEmail.Text;
        }
    
    
    }
    Now it was working before I just cant seem to get the smart mailer back to what is was any Ideas, at this point I am desperate.
     
    Last edited by a moderator: Oct 14, 2015
  2. ComputerMan

    ComputerMan Winhost Staff

    The user not found error means that you're not authenticating against the SMTP service on the mail server.

    When sending an email message from your site account you must authenticate against our mail server's SMTP service with one of the email users you created on Smartermail.

    The username would be the full email address. The password is the password for the email user you created on SmarterMail.

    Read our knowledge base article on how to send mail using ASP.NET. You will see that the code shows you how to authenticate against the mail server with one of the email users.
     
    Last edited by a moderator: Oct 14, 2015

Share This Page