Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Send html in body

Discussion in 'Information Technology' started by rico, Jul 28, 2006.

  1. rico

    Expand Collapse

    Hi all,

    I'm using the following code to send multiple emails from the backend to

    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") = ""
    .item(strSch & "SMTPAuthenticate") = cdoBasic

    '.item(strSch & "SendUserName") = "User@domain.com"
    '.item(strSch & "SendPassword") = "AccountPassword"


    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


    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

  2. Loading...

    Similar Threads Forum Date
    Sikh News Why This Sikh Cartoonist Is Sending A Postcard To Trump Every Day Breaking News Mar 23, 2016
    UK Statue of turbaned Sikh fighter pilot unveiled in Gravesend Breaking News Nov 29, 2014
    Leisure Appropriate to send flowers to a friend's ill Mother in India? Business, Lifestyle & Leisure Jun 6, 2013
    USA Preet Bharara Sends a Message to Wall Street about Insider Trading Breaking News May 18, 2011
    USA U.S. Sends Warning to People Named in Cable Leaks Breaking News Jan 7, 2011

Share This Page