PDA

View Full Version : Access Denied when sending mail


jwilley
07-30-2004, 09:27 AM
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 "john@willfam.com" 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;john@willfam.com
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp;550 5.0.0 Access denied
++++++++++++++++++++++++++++++++++++++++++++++++++ +++

bruce
07-30-2004, 11:39 AM
can you post the code please?
[b]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 "john@willfam.com" 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;john@willfam.com
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp;550 5.0.0 Access denied
++++++++++++++++++++++++++++++++++++++++++++++++++ +++
</blockquote id="quote"></font id="quote">

cms
07-31-2004, 01:52 AM
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

cms
07-31-2004, 12:55 PM
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

cms
07-31-2004, 12:57 PM
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

Rookiee
08-05-2004, 04:16 AM
I ran into the same problem, 'Could not access 'CDO.Message' object.
My application worked last month when i tested it.

Rookiee
08-05-2004, 08:59 AM
I changed the smtp server to 'localhost'. It works

danadrian
08-09-2004, 04:20 AM
please I have the same problem....maibe a little worst :) here is the code:

SmtpMail.SmtpServer = "Localhost"
SmtpMail.Send("dan@k.ro", "dan.lutescu@nan.nifleim.net", "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 dan.lutescu@nan.nifleim.net
I don't understand..that email exists...I think is something with my smtp configuration. Maibe you can help me

entertainme
08-14-2004, 06:10 AM
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 xxxxxxx@xx.xx.xx

Any suggestions on what could be causing this?

bruce
08-17-2004, 04:15 AM
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("dan@k.ro", "dan.lutescu@nan.nifleim.net", "test", "test")

Whitout "smtpmail.smtp.server="localhost"" I receive the error
[b]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 dan.lutescu@nan.nifleim.net
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

joer00
08-17-2004, 12:08 PM
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