Good Day
I was wondering if anyone else has maybe experienced this.
I am currently using CDO to send emails from Access and was working perfectly until yesterday i granted a user rights to send emails from the same email address as specified in my CDO Config.
I now when sending from Access get the following error
550 5.7.1 unable to relay to name@company.com
I can still send to all internal users but no external.
I have googled and noted various notes on smtp restrictions.
has anyone maybe encounter this, I am not to familiar with mail servers and just want to send email via CDO in Access.
Does anyone maybe know of something i can do to amend my exisiting code to i am currently using the following
I would really appreciate any advise
Regards
SN
I was wondering if anyone else has maybe experienced this.
I am currently using CDO to send emails from Access and was working perfectly until yesterday i granted a user rights to send emails from the same email address as specified in my CDO Config.
I now when sending from Access get the following error
550 5.7.1 unable to relay to name@company.com
I can still send to all internal users but no external.
I have googled and noted various notes on smtp restrictions.
has anyone maybe encounter this, I am not to familiar with mail servers and just want to send email via CDO in Access.
Does anyone maybe know of something i can do to amend my exisiting code to i am currently using the following
I would really appreciate any advise
Regards
SN
Code:
Private Sub SendEmail_Click()
On Error GoTo Err_Handler
Dim strMsg As String, iIcon As Integer, StrTitle As String
Dim cdoConfig
Dim msgOne
CC = Me.CC_Address
Bcc = Me.BCC_Address
Dim strAttachment As String
strAttachment = Me.Mail_Attachment_Path
Dim ID As String
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServerPort) = (25)
.Item(cdoSMTPServer) = "mail.company.com"
.Item(cdoSendUserName) = "me.company.com"
.Item(cdoSendPassword) = "password"
.Update
End With
Set msgOne = CreateObject("CDO.Message")
Set msgOne.Configuration = cdoConfig
msgOne.Subject = Me.Mess_Subject
msgOne.From = "me@company.com"
msgOne.To = Me.Email_Address
msgOne.TextBody = vbCrLf & vbCrLf & "Reference No: " & Me.ID & vbCrLf & vbCrLf & Me.mess_text
If Len(Bcc) > 0 Then msgOne.Bcc = Bcc
If Len(Bcc) > 0 Then msgOne.CC = CC
If Len(AddAttachment) > 0 Then msgOne.AddAttachment strAttachment
msgOne.Send
MsgBox "Email Sent Sucessfully"
etc etc
End Sub