Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi guys

 

A while back, i tried to send emails from my ASP.net page, at the time was successful. Back then all i had to do was to register the cdosys.dll file, and modify the code for the sender, receiver and the password. The Sender accound was an oceanfree account. The process work at the time.

 

I opened the same project lately and attempted to send the emails again but am now getting a error message saying that "Server unable to process request System.Web.HTTPException. Could not access CDO.Message... The server response was: 550 relaying to <email address> prohibited by administrator"

 

Any suggestions on how to get around this. Heres my code also.

 

Imports System

Imports System.Data

Imports System.Data.Odbc

Imports System.Data.Odbc.OdbcException

Imports System.Web.Mail

Imports CDO

Imports CDONTS

Imports ADODB

 

Dim mail As New MailMessage

mail.To = "michael.j.odonnell@students.ittralee.ie"

mail.From = "*******@oceanfree.net"

mail.Subject = "Test!"

mail.Body = "Tesing!"

 

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'basic authentication

 

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "*******") 'set your username here

 

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "*****") 'set your password here

 

SmtpMail.SmtpServer = "smtp.oceanfree.net"

Try

SmtpMail.Send(mail)

Catch ex As Exception

Throw ex

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

  • Administrators
Posted

Your best bet may be contacting the SMTP server provider - an error of 550 indicates the server has been configured to not send to the destination address.

As to a way round the problem then if speaking to their administrator doesn't resolve anything you may need to consider an alternate mail provider.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
Your best bet may be contacting the SMTP server provider - an error of 550 indicates the server has been configured to not send to the destination address.

As to a way round the problem then if speaking to their administrator doesn't resolve anything you may need to consider an alternate mail provider.

 

Am using the SMTP server provided by IIS, have selected "allow all except below list" in Relay Restrictions under the Access Tab.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Posted

Am using the email provider oceanfree.ie to send the messages, however i was of the impression that i had to set the ISS on my machine to allow myself to send emails out. As far as i can see, the problem is with the CDO, however i downloaded a new version and registered it in the System32 folder in the Widows folder so it should not be causing this problem.

 

Mike.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

  • Administrators
Posted

SmtpMail.SmtpServer = "smtp.oceanfree.net"

looks like you are using their server not your local IIS - the problem is they are not relaying your e-mails for some reason of their own. If you either point a mail client or telnet (if you are feeling techie) can you send e-mails that way? If not I would recomend checking with the ISP to see if there is a problem.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...