outgoing email settings for ASP .NET razor webmail helper

Discussion in 'Email' started by echofive, Jun 17, 2012.

  1. Hi,

    Im getting this error -

    System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: <email@live.com> No such user here at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at System.Web.Helpers.WebMail.Send(String to, String subject, String body, String from, String cc, IEnumerable`1 filesToAttach, Boolean isBodyHtml, IEnumerable`1 additionalHeaders, String bcc, String contentEncoding, String headerEncoding, String priority, String replyTo) at ASP._Page_Email_Send_cshtml.Execute() in e:\web\echofive\Email_Send.cshtml:line 7

    my webmail helper is set up like this -

    @{
    WebMail.SmtpServer = "mail.echo-five.net";
    WebMail.SmtpPort = 587;
    WebMail.EnableSsl = false;
    WebMail.UserName = "postmaster";
    WebMail.Password = "password";
    WebMail.From = "postmaster@echo-five.net";
    }

    Ive tried using port 25 also, SSL can not be set to true on Winhost servers, all details are correct, the email im sending to works fine, ive tried sending to other emails, i've set the app to fully trusted.

    what else can I try?

    thanks :)
     
    Last edited by a moderator: Oct 14, 2015
  2. worked it out. user name had to be the entire "postmaster@echo-five.net" not just the first part.

    thanks anyway!
     
  3. Glad you worked it out.
     
  4. I'm having a very similar issue, and was wondering if there is anything I need to set up in the mail program, etc. Here are my current settings, I have no error message, just that the condition (!WebMail.SmtpServer.IsEmpty()) has not been met on your server. I can make it work in my local environment,

    @{
    WebSecurity.InitializeDatabaseConnection(....);

    WebMail.SmtpServer = "mail.spectrumtrial.com";
    WebMail.SmtpPort = 587;
    WebMail.EnableSsl = false;
    WebMail.UserName = "postmaster@spectrumtrial.com";
    WebMail.Password = "password";
    WebMail.From = "postmaster@spectrumtrial.com";
    }

    Any ideas? Thanks.
     
  5. Does anyone see anything out of the ordinary here? I really don't know where to go from here.
     

Share This Page