R
rico
Hi all,
I'm using the following code to send multiple emails from the backend to
users.
Public Function sendCDOEmail(txtFrom As String, txtTo As String, txtSubject
As String, _
txtBody As String, Optional strAttachment As
String, Optional txtHTMLBody)
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objCDOConfig As Object
Dim objCDOMessage As Object
Dim strSch As String
strSch = "http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.item(strSch & "sendusing") = cdoSendUsingPort
.item(strSch & "smtpserver") = "192.168.0.2"
.item(strSch & "SMTPAuthenticate") = cdoBasic
'.item(strSch & "SendUserName") = "(e-mail address removed)"
'.item(strSch & "SendPassword") = "AccountPassword"
.Update
End With
Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.FROM = txtFrom
.Sender = txtFrom
.To = txtTo
.cc = SendCc
.Subject = txtSubject
.TextBody = txtBody
.HTMLBody = txtHTMLBody
.send
End With
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing
End Function
I was wondering if there was any way i could get a data access page into the
body of the email. The html of the data access page wont go directly into the
html body variable cus is has lots of quotations in it.
Any ideas
TIA
I'm using the following code to send multiple emails from the backend to
users.
Public Function sendCDOEmail(txtFrom As String, txtTo As String, txtSubject
As String, _
txtBody As String, Optional strAttachment As
String, Optional txtHTMLBody)
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objCDOConfig As Object
Dim objCDOMessage As Object
Dim strSch As String
strSch = "http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.item(strSch & "sendusing") = cdoSendUsingPort
.item(strSch & "smtpserver") = "192.168.0.2"
.item(strSch & "SMTPAuthenticate") = cdoBasic
'.item(strSch & "SendUserName") = "(e-mail address removed)"
'.item(strSch & "SendPassword") = "AccountPassword"
.Update
End With
Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.FROM = txtFrom
.Sender = txtFrom
.To = txtTo
.cc = SendCc
.Subject = txtSubject
.TextBody = txtBody
.HTMLBody = txtHTMLBody
.send
End With
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing
End Function
I was wondering if there was any way i could get a data access page into the
body of the email. The html of the data access page wont go directly into the
html body variable cus is has lots of quotations in it.
Any ideas
TIA