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

Since you're here... we have a small favor to ask...     Become a Supporter      ::     Make a Contribution     

Share This Page