Sending HTML mail to users like newsletters

Results 1 to 2 of 2

Thread: Sending HTML mail to users like newsletters

  1. #1
    Join Date
    Dec 1969

    Default Sending HTML mail to users like newsletters

    Hi.. im using ASP Mail on a server to send emails to members of my site.. But i dont know how to send HTML emails.. a friend taught me how to send emails but i havent been able to find anywhere that tells me how to make these emails HTML.. it just sends the HTML code.. please help:<BR><BR>&#060;!--#include virtual="/"--&#062;<BR>&#060;%<BR>Set NewMailObj = CreateObject("CDONTS.Newmail")<BR>NewMailObj.From = "blahblah"<BR>NewMailObj.To = Email<BR>NewMailObj.Subject = "Account Edited"<BR>NewMailObj.MailFormat = CdoMailFormateMime<BR>NewMailObj.BodyFormat = CdoBodyFormatText<BR><BR>sMailBody = "---------------------------------------" & vbNewLine<BR>sMailBody = sMailBody & " Welcome !! " & vbNewLine<BR>sMailBody = sMailBody & "---------------------------------------" & vbNewLine & vbNewLine<BR>sMailBody = sMailBody & "Your account has been edited." & vbNewLine & vbNewLine<BR>sMailBody = sMailBody & "Username: "&Username&"" & vbNewLine<BR>sMailBody = sMailBody & "Password: "&Password&"" & vbNewLine & vbNewLine<BR>NewMailObj.Body = sMailBody<BR><BR>NewMailObj.Send<BR>Set NewMailObj = Nothing<BR>%&#062;<BR><BR>Above is an example of what i am using to send emails. Note: CDONTS is shown below. But like i said it doesnt work for HTML please tell me how i can change this.<BR><BR>CDONTS.INC:<BR><BR>&#060;%<BR>&#039; CDONTS Constants<BR><BR>&#039; CDONTS Attachment.Type values<BR>Const CdoFileData = 1<BR>Const CdoEmbeddaedMessage = 4<BR><BR>&#039; CDONTS Message.Importance Values. Also Used in NewMail.Importance<BR>Const CdoLow = 0<BR>Const CdoNormal = 1<BR>Const CdoHigh = 2<BR><BR>&#039; CDONTS Message.MessageFormat and Session.MessageFormat Values<BR>Const CdoMime = 0<BR>Const CdoText = 1<BR><BR>&#039; CDONTS NewMail.AttachFile and NewMail.AttachURL EncodingMethod Values<BR>Const CdoEncodingUUencode = 0<BR>Const CdoEncodingBase64 = 1<BR><BR>&#039; CDONTS NewMail.BodyFormat Values<BR>Const CdoBodyFormatHTML = 0<BR>Const CdoBodyFormatText = 1<BR><BR>&#039; CDONTS NewMail.MailFormat Values<BR>Const CdoMailFormatHTML = 0<BR>Const CdoMailFormatText = 1<BR><BR>&#039; CDONTS Recipient.Type Values<BR>Const CdoTo = 1<BR>Const CdoCc = 2<BR>Const CdoBcc = 3<BR><BR>&#039; CDONTS Session.GetDefaultFolder Values<BR>Const CdoDefaultFolderInbox = 1<BR>Const CdoDefaultFolderOutbox = 2<BR><BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Sending HTML mail to users like newsletters

    If u just write these two lines in your code I guess it should work, the body format sets the type to HTML (0 = HTML, 1 = text), and the mailformat sets the mail type the MIME ...<BR><BR>NewMailObj.BodyFormat=0<BR>NewMailObj.M ailFormat=0<BR><BR>hope it works<BR><BR>greets<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts