Below code uses CDONTS mailer built into IIS.   Works great

just define the variables below.

Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From    = strFrom
objCDO.To      = strTo
objCDO.Subject = strSubject
objCDO.Body    = strBody

objCDO.BodyFormat = 0 ' CdoBodyFormatHTML
objCDO.MailFormat = 0 ' CdoMailFormatMime

objCDO.Cc  = [EMAIL PROTECTED];[EMAIL PROTECTED]
'objCDO.Bcc = [EMAIL PROTECTED];[EMAIL PROTECTED]

objCDO.Send
Set objCDO = Nothing

----- Original Message ----- 
From: "Grant Griffith - IMail" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 13, 2004 3:00 PM
Subject: RE: [IMail Forum] Sending HTML email from ASP or VB code


> We use ASPMail to send some HTML emails and it works just fine.  I will
try
> to find a sample to send.
>
>
> Thanks,
> Grant Griffith
> EI8HT LEGS, A Division of ETC
> (877)483-3393
> (812)933-5390
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Matt
> Sent: Monday, December 13, 2004 3:53 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [IMail Forum] Sending HTML email from ASP or VB code
>
> JB,
>
> You are actually using a server-side ActiveX component called ASPMail to
> handle the E-mail.  Instructions for this component can be found on the
> following page:
>
>     http://www.serverobjects.com/comp/Aspmail4.htm
>
> You control the content-type with the "ContentType" property.  It appears
> however that you can only set one content-type per message, and you are
> therefore SOL with this component.
>
> If you are on a Windows 2000 machine, look into using the built-in CDO
> object for sending E-mail.  You can definitely construct a message with
both
> content-types.
>
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html
> /_cdosys_imessage_interface.asp
>
> You can also Google for many other coding examples using "CDO ASP".
>
> Matt
>
>
>
> Corsair wrote:
>
> >I'm attempting to send an HTML-formatted email from a Visual Basic 6.0
> >module or VBScript on an ASP page using the following code, and can
> >successfully send text-formatted mail, but if I send it HTML code it
> >will send this plain text rather than in HTML format. Can anyone tell
> >me how to change the code, or the IMail settings, to send HTML formatted
> mail?
> >
> >The various str items, such as strMailBody, are variables receiving
> >appropriate text up above where this is called.
> >
> >Thank you,
> >
> >JB
> >
> >        Dim Mailer As Object
> >        Const smtpMailHost = "mydomainname.com"
> >        ' call mail object
> >        Set Mailer = CreateObject("SMTPsvg.Mailer")
> >        Mailer.RemoteHost = smtpMailHost
> >
> >        ' set up message
> >        Mailer.FromAddress = strFromEmail
> >        Mailer.fromName = strFromName
> >        Mailer.AddRecipient strToName, strToEmail
> >        If strCCEmail <> "" Then
> >            Mailer.AddCC strCCName, strCCEmail
> >        End If
> >
> >        Mailer.Subject = strSubject
> >        Mailer.BodyText = strMailBody
> >
> >        Mailer.SendMail
> >        Set Mailer = Nothing
> >
> >
> >To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
> >List Archive:
> >http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
> >Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
> >
> >
> >
> >
>
> --
> =====================================================
> MailPure custom filters for Declude JunkMail Pro.
> http://www.mailpure.com/software/
> =====================================================
>
>
> To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
> List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
> Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
>
>
> To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
> List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
> Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
>
>



To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

Reply via email to