I have been trying to get this code to work:
Sub Mail_Small_Text_CDO()
Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
' Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "111.111.111.111" 'Need your STMP address here
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
strbody = "Hey There," & vbNewLine & vbNewLine & _
"Test 1" & vbNewLine & _
"Test 2" & vbNewLine & _
"Test 3" & vbNewLine & _
"Test 4"
With iMsg
Set .Configuration = iConf
.To = "Test@Test.com"
.CC = ""
.BCC = ""
.From = """TestUser"" <TestUser@test.com>"
.Subject = "Important message"
.TextBody = strbody
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub
But when I get to
.Send
I get an error
I have tried other code, but then I get an error box about if I want to continue sending, and I CAN'T install anything to get around this, is there something else that I can do to answer this box YES???