Hello MS Access Expert,
I am receiving the below 530 Authentication Required error despite having Authentication turned on in my VBA code (See below). The email provider I am using is 1and1 with the below posted settings. When I turn on .Item(sch & "sendtls") = True I still receive the same 530 Error message. When I set .Item(sch & "smtpusessl") = True I receive a the "transport failed to connect to server error."
I called 1and1 but they don't provide support for these type of issues and I am not sure how to further proceed.
Thank you for any assistance you can provide.
With cdoConfig.Fields
.Item(sch & "sendusing") = 2
.Item(sch & "smtpserverport") = 587
.Item(sch & "smtpserver") = "smtp.1and1.com"
.Item(sch & "smtpauthenticate") = 1
.Item(sch & "sendusername") = "your-email@1and1.com"
.Item(sch & "sendpassword") = "Your 1and1.com password"
.Item(sch & "sendemailaddress") = "your-email@1and1.com"
.Update
End With
Full Code:
I am receiving the below 530 Authentication Required error despite having Authentication turned on in my VBA code (See below). The email provider I am using is 1and1 with the below posted settings. When I turn on .Item(sch & "sendtls") = True I still receive the same 530 Error message. When I set .Item(sch & "smtpusessl") = True I receive a the "transport failed to connect to server error."
I called 1and1 but they don't provide support for these type of issues and I am not sure how to further proceed.
Thank you for any assistance you can provide.
With cdoConfig.Fields
.Item(sch & "sendusing") = 2
.Item(sch & "smtpserverport") = 587
.Item(sch & "smtpserver") = "smtp.1and1.com"
.Item(sch & "smtpauthenticate") = 1
.Item(sch & "sendusername") = "your-email@1and1.com"
.Item(sch & "sendpassword") = "Your 1and1.com password"
.Item(sch & "sendemailaddress") = "your-email@1and1.com"
.Update
End With
Full Code:
Code:
Public Sub Send1and1()
Dim objMessage As Variant
Dim cdoConfig As Variant
Dim sch As String
'Set up cdo Configurations
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2
.Item(sch & "smtpserverport") = 587
.Item(sch & "smtpserver") = "smtp.1and1.com"
.Item(sch & "smtpauthenticate") = 1
.Item(sch & "sendusername") = "your-email@1and1.com"
.Item(sch & "sendpassword") = "Your 1and1.com password"
.Item(sch & "sendemailaddress") = "your-email@1and1.com"
.Item(sch & "sendtls") = True
.Item(sch & "smtpusessl") = True
.Update
End With
'Creates CDO mail object
Set objMessage = CreateObject("CDO.Message")
Set objMessage.Configuration = cdoConfig
objMessage.Subject = "Peter CDO"
objMessage.From = "your-email@1and1.com"
objMessage.To = "destination@access.ca"
objMessage.TextBody = "CDO Test"
objMessage.Send
Set objMessage = Nothing
Set cdoConfig = Nothing
End Sub