BensTooCool
New Member
- Joined
- Nov 18, 2014
- Messages
- 10
Hi,
I've developed a bit of VBA that will send an email from a shared mailbox to a mailing list that is stored within an array. This process works fine except for any addresses outside my organisation. I will get this error:
If I send the email manually myself from the mailbox then it's fine, it is just whenever I try through VBA. Any ideas?
VBA CODE
Set cdoConfig = New CDO.Configuration
fileIterator = 0
With cdoConfig
.Fields(cdoSMTPServer) = "<SMTP SERVER>"
.Fields(cdoSMTPServerPort) = 25
.Fields(cdoSendUsingMethod) = cdoSendUsingPort
.Fields(cdoSMTPConnectionTimeout) = 200
.Fields.Update
End With
Set cdoMsg = New CDO.Message
With cdoMsg
Set .Configuration = cdoConfig
.From = <MAILBOX>
.Subject = <SUBJECT>
.HTMLBody = <TEXT>
.To = mailList
.Send
End With
Set cdoMsg = Nothing
Set cdoConfig = Nothing
I've developed a bit of VBA that will send an email from a shared mailbox to a mailing list that is stored within an array. This process works fine except for any addresses outside my organisation. I will get this error:
If I send the email manually myself from the mailbox then it's fine, it is just whenever I try through VBA. Any ideas?
VBA CODE
Set cdoConfig = New CDO.Configuration
fileIterator = 0
With cdoConfig
.Fields(cdoSMTPServer) = "<SMTP SERVER>"
.Fields(cdoSMTPServerPort) = 25
.Fields(cdoSendUsingMethod) = cdoSendUsingPort
.Fields(cdoSMTPConnectionTimeout) = 200
.Fields.Update
End With
Set cdoMsg = New CDO.Message
With cdoMsg
Set .Configuration = cdoConfig
.From = <MAILBOX>
.Subject = <SUBJECT>
.HTMLBody = <TEXT>
.To = mailList
.Send
End With
Set cdoMsg = Nothing
Set cdoConfig = Nothing