Mailbox unavailable. The server response was: <> No such user here

Discussion in 'Email' started by sigortaonli, Oct 1, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. hi

    i'm trying tp send a mail in my ASP.net application i added the configuration of th SMTP to the Web.config:

    <system.net>
    <mailSettings>
    <smtp from="" deliveryMethod="network">
    <network host="smtp.sigorta-online.com" port="25" defaultCredentials="true" />
    </smtp>
    </mailSettings>
    </system.net>

    and this is the function
    Public Shared Function SendMail(ByVal strFrom As String, ByVal strTo As String, ByVal strSubject As String, ByVal strMsg As String) As Boolean
    Try
    ' Create the mail message
    Dim objMailMsg As MailMessage = New MailMessage(strFrom, strTo)

    objMailMsg.BodyEncoding = Encoding.UTF8
    objMailMsg.Subject = strSubject
    objMailMsg.Body = strMsg
    objMailMsg.Priority = MailPriority.High
    objMailMsg.IsBodyHtml = True

    'prepare to send mail via SMTP transport
    Dim objSMTPClient As SmtpClient = New SmtpClient("smtp.sigorta-online.com", 25)
    objSMTPClient.Credentials = CredentialCache.DefaultNetworkCredentials
    objSMTPClient.UseDefaultCredentials = True
    objSMTPClient.DeliveryMethod = SmtpDeliveryMethod.Network
    objSMTPClient.Send(objMailMsg)
    Return True
    Catch ex As Exception
    Throw ex
    End Try
    End Function

    it's giving this error
    and now it's giving me this message :

    Mailbox unavailable. The server response was: < > No such user here
    what ever the mail adress i used it's giving me the same error
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    setting smtphost to localhost should solve your problem.
     
  3. Dear Bruce i tried what you said and now its giving this error message :
    Failure sending mail.Unable to connect to the remote server

    Please i would appreciate your assisstance....what i want to do is to send an automatic mail from my ASP.net Website to the clients ..they may have yahoo, hotmail or gmail accounts ....and the account from where i'm sending may be static (but better if it can be variable ).......please do help
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    where are you running this code? on our server / your home computer?
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page