I believe that I found an answer to the same question on the forum last year, sorry, don't remember who submitted it, but it works:
Sub SendCDO()
Dim dbs As DATABASE
Set dbs = CurrentDb
Dim nbUser As Long
nbUser = Forms!frmCalender!cboUser
Dim rstS As Recordset
Set rstS = dbs.OpenRecordset("SELECT tblUser.UserID, tblUser.UserEmail, tblUser.ReportTo, tblUser.ReportToEmail " _
& "FROM tblUser WHERE (((tblUser.UserID) = " & nbUser & "));")
Dim email As New CDO.message
With email
.AddAttachment "C:\VacRequest.txt"
.HTMLBody = "<H4>Please review attached file.</H4>"
.From = rstS!UserEmail
.To = rstS!ReportToEmail
.Subject = "Time-Off Request"
.Configuration.Fields.Item _
("
= 2
'Name or IP of Remote SMTP Server
.Configuration.Fields.Item _
("
= "smtp.wellpoint.com"
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
.Configuration.Fields.Item _
("
= cdoBasic
'Your UserID on the SMTP server
.Configuration.Fields.Item _
("
= "xxxxxxxxx"
'Your password on the SMTP server
.Configuration.Fields.Item _
("
= "xxxxxxxxx"
'Server port (typically 25)
.Configuration.Fields.Item _
("
= 25
'Use SSL for the connection (False or True)
.Configuration.Fields.Item _
("
= False
'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
.Configuration.Fields.Item _
("
= 60
.Configuration.Fields.Update
'==End remote SMTP server configuration section==
.Send
End With
End Sub