Send html in body

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

vbscript to send e-mail to exchange 2007 0
Sending E-mail 3
Send email to exchange versus SMTP 1
Sending E-Mail 11
WildCard 16
DoEvents 3
CDO & MailMessage problem 2
Using the CDO object to send email... 3

Top