Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!   Become a Supporter    ::   Make a Contribution   
    Monthly (Recurring) Target: $300 :: Achieved: $95

Send html in body

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

Tags:
  1. rico

    rico
    Expand Collapse
    Guest

    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") = "User@domain.com"
    '.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
     
  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...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page