Jump to content

Recommended Posts

Posted

Good morning, trying to get email to work for liberum using CDOSYS with the following code. The email is hosted externally on a exchange box (lancsngfl) when ever i test the mail i receive this error

 

Application Error

Number: -2147220978 (0x8004020E)

Source:

Description: The server rejected the sender address. The server response was: 550 5.7.1 Client does not have permissions to send as this sender

--------------------------------------------------------------------------------

 

The code is as follows

 

Case 5 ' CDOSYS

DIM strIncomingMailServer, objCDOSYSMail, objCDOSYSCon

'Create the e-mail server object

strIncomingMailServer = Cfg(cnnDB, "SMTPServer")

Set objCDOSYSMail = Server.CreateObject("CDO.Message")

Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

 

'Set and update fields properties

With objCDOSYSCon

 

'Out going SMTP server

.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "outlook.lancsngfl.ac.uk"

'SMTP port

.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'CDO Port

.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Timeout

.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

 

.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication

.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="[email protected]"

.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="password"

 

.Fields.Update

End With

 

'Update the CDOSYS Configuration

Set objCDOSYSMail.Configuration = objCDOSYSCon

 

With objCDOSYSMail

.From = Cfg(cnnDB, "HDName") & " <" & Cfg(cnnDB, "HDReply") & ">"

.To = strToAddr

.Subject = strSubject

'.HTMLBody = strBody 'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)

.TextBody = strBody

'Send the e-mail

If NOT strIncomingMailServer = "" Then .Send

End with

 

'Close the server mail object

Set objCDOSYSMail = Nothing

 

 

End Select

 

Please could some one help i have liberum installed on a 2003 box and just wondering if i am missing something or if a port is blocked.

Posted
they were correct i had doubled checked it turns out that the smtp server was wrong our LEA has two and i didnt realise, i checked others servers that mail us with updates and spoted that sophos was using a different one and that one worked. Learn something new everyday at least im more up to speed now with asp coding for differnt mail options had tried them all in the end and then found this out

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...