Results 1 to 3 of 3

Thread: Error send email?

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2004
    Posts
    7

    Error send email?

    Helo, I have a problem when sending email from VB.Net application, the error message is
    "The server rejected one or more recipient addresses. The server
    response was: 550 5.7.1 Unable to relay for [email protected]".
    What is actually is the problem? How can i get out from this problem? Anyone have any idea, please reply. Thanks
    in advance....
    ------------------------
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As

    System.EventArgs) Handles Button1.Click

    try
    Dim objEmailMessage As System.Web.Mail.MailMessage
    Dim objSMTPServer As System.Web.Mail.SmtpMail
    objSMTPServer.SmtpServer = "mycomputername"

    objEmailMessage = New System.Web.Mail.MailMessage
    With objEmailMessage
    .To = "[email protected]"
    .From = txtFrom.Text
    .Subject = "Great Job!"
    .Body = "Want all my money?"

    End With

    objSMTPServer.Send(objEmailMessage)
    catch exc as exception
    response.write(exc.innerexception.innerexception.message)
    end try
    End SubError send email?
    Make A Project for Assignment using VB.Net and ASP.Net

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    That is an SMTP error. Your server probably has relaying either restricted, or totally turned off (either of which is a good thing). If it is restricted, you should be able to send an email as long as the from email address is considered valid in the restrictions.

    For instance, my email server only lets me send emails from email addresses that are valid within my domain. So if I send one from [email protected] it would work, but if I tried to send from [email protected] or even [email protected] it would not work.

  3. #3
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    You should be able to get around this by authenticating with the outside server. For instance I have a public domain that I route all my email through. If I want to send an email from a Windows/Web app on my desktop, which connects to my smtp server through an ISP (different domain). I can do so by writing the authenrication right into the code block (see this FAQ for more info.

    It has been a while since I did this but as I remember it was as easy as adding the authentication and running the app.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width