locked
User not local; please try a different path. The server response was: Sender address is not valid for your login. Check your email program settings. RRS feed

  • Question

  • In my email sendig project

    When I am using smtp.gmail.com its working fine

    when  using my smtp server it shows error  which is:

    User not local; please try a different path. The server response was: Sender address is not valid for your login. Check your email program settings.

    The code am using is

    Dim SmtpMail As New SmtpClient
                        Dim log As New Net.NetworkCredential("mename", "pwd")
                        SmtpMail.Host = ("smtp.myhome.com")
                        SmtpMail.Port = "25"
                        SmtpMail.EnableSsl = False
                        'SmtpMail.UseDefaultCredentials = False
                        SmtpMail.Credentials = log
                        SmtpMail.Send(mEmail)

    previously I was used enableSsl as true. that time I got an error "server does not support secure connection "

    Now taht problem was solved but it remaining. what should i do?

    Please help

    Wednesday, June 1, 2011 11:42 AM

All replies

  • Your SMTP server is returning that error.  It seems to think you want to "relay" email and it doesn't allow that since it is used by spammers.  If the server handles domain example.com then it won't let emails from say foo@yahoo.com be sent through it.  The user id you send as should be one local to the server. (Or the email destination user should be on the server).

    Or the server may allow sending from any addresses if you have authenticated to it...


    http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
    Wednesday, June 1, 2011 6:49 PM