Access Denied when sending mail

Discussion in 'ASP.NET / ASP.NET Core' started by jwilley, Jul 30, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,
    Am adding the ability to send mail from my application. I get a failure message sent to the "From" address which contains the following details.txt attachment. The address "[email protected]" IS valid.

    Any ideas greatly appreciated -- john


    +++++++++++++++++++++++++++++++++++++++++++++++++++++

    Reporting-MTA: dns;web108.discountasp.net
    Received-From-MTA: dns;web108
    Arrival-Date: Fri, 30 Jul 2004 09:11:30 -0700

    Final-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.0.0
    Diagnostic-Code: smtp;550 5.0.0 Access denied
    +++++++++++++++++++++++++++++++++++++++++++++++++++++
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    can you post the code please?
    quote:Originally posted by jwilley

    Hi,
    Am adding the ability to send mail from my application. I get a failure message sent to the "From" address which contains the following details.txt attachment. The address "[email protected]" IS valid.

    Any ideas greatly appreciated -- john


    +++++++++++++++++++++++++++++++++++++++++++++++++++++

    Reporting-MTA: dns;web108.discountasp.net
    Received-From-MTA: dns;web108
    Arrival-Date: Fri, 30 Jul 2004 09:11:30 -0700

    Final-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.0.0
    Diagnostic-Code: smtp;550 5.0.0 Access denied
    +++++++++++++++++++++++++++++++++++++++++++++++++++++
    </blockquote id="quote"></font id="quote">
     
  3. cms

    cms

    Alright, in case someone else is reading this and is having the same problem, tech support got me going.

    The solution: set the SMTP Server to localhost. Hope this helps!!


    cms
     
  4. cms

    cms

    Hi Jwilley and Bruce,

    Have either of you figured this out? I'm having the same problem now. I just uploaded a new versin of my site, noticed emails weren't being sent. Thing is, the code works fine on my machine. On a hunch, I uploaded an older version of the site which I know is working fine. Again, no emails being sent when hosted via discountasp.net. Yet, works fine on my machine. I've done enough checking that I'm convinced there is a problem with Discountasp.net somewhere. I'm putting the code to send the email in a try...catch block. The errormessage is output to trace.axd. I'm getting this error message:

    From routine 'SendEmail': Could not access 'CDO.Message' object.

    The code that sends the email is:

    Public Function SendEmail(ByVal bcc_recipient As String, _
    ByVal message As String, _
    ByVal subject As String) As Boolean

    ErrorMessage = ""

    Try
    Dim email As New Mail.MailMessage
    email.Bcc = bcc_recipient
    'the below line needs to be a valid email address at the mail server identified below
    'i.e. you can't just make something up; retrieve this from the web.config file
    email.From = EmailFrom
    email.Body = message
    email.Subject = subject
    email.BodyFormat = Web.Mail.MailFormat.Text
    'need a valid mailserver, identified by appsetting in web.config
    Mail.SmtpMail.SmtpServer = MailServer
    Mail.SmtpMail.Send(email)
    Return True
    Catch ex As Exception
    ErrorMessage = ex.Message
    With HttpContext.Current
    .Trace.Warn("Email", "From routine 'SendEmail': " & ErrorMessage)
    .Trace.Warn("Email", "Email is from: " & EmailFrom)
    .Trace.Warn("Email", "The subject of the email is: " & subject)
    .Trace.Warn("Email", "The message/content of the email is: " & message)
    End With
    Return False
    End Try
    End Function</font id="size3"></font id="Arial">


    cms
     
  5. cms

    cms

    Furthermore, I know everythign was working fine up till last Thursday (July 29). The problem seems to have developed since then and now. Thanks!


    cms
     
  6. I ran into the same problem, 'Could not access 'CDO.Message' object.
    My application worked last month when i tested it.
     
  7. I changed the smtp server to 'localhost'. It works
     
  8. please I have the same problem....maibe a little worst :) here is the code:

    SmtpMail.SmtpServer = "Localhost"
    SmtpMail.Send("[email protected]", "[email protected]", "test", "test")

    Whitout "smtpmail.smtp.server="localhost"" I receive the error
    The "SendUsing" configuration value is invalid.
    and with it i recive this error:
    The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for [email protected]
    I don't understand..that email exists...I think is something with my smtp configuration. Maibe you can help me
     
  9. I am getting the same response:
    I recently turned on email support for one of my pages that used to work like a champ. I am now getting the following error:

    The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for [email protected]

    Any suggestions on what could be causing this?
     
  10. Bruce

    Bruce DiscountASP.NET Staff

    Are you running these code on your local web server or our web server?

    quote:Originally posted by danadrian

    please I have the same problem....maibe a little worst :) here is the code:

    SmtpMail.SmtpServer = "Localhost"
    SmtpMail.Send("[email protected]", "[email protected]", "test", "test")

    Whitout "smtpmail.smtp.server="localhost"" I receive the error
    The "SendUsing" configuration value is invalid.
    and with it i recive this error:
    The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for [email protected]
    I don't understand..that email exists...I think is something with my smtp configuration. Maibe you can help me
    </blockquote id="quote"></font id="quote">

    B.

    DiscountASP.NET
    http://www.DiscountASP.NET
     
  11. The outgoing mail server you use must allow you to send mail from the network your web server is on.

    If the server requires authenticatio, you have to send login data with the mail.

    In case of bellsouth (what I am using) for example, sending mails fails from my provider, because his web server is not on teh bellsouth network. The same accounts to yahoo. This is to prevent spam. The easiest way to solve this is to send the mail from a mail account on your web server in that domain. Usually the hosting provider gives you some free mailboxes, use this and his smtp server.

    joe Robe
     
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