| <% |
| |
| Dim myMail |
| Dim HTML |
| Set myMail = CreateObject("CDONTS.NewMail") |
| |
| HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">" |
| HTMLHTML = HTML & "<html>" |
| HTMLHTML = HTML & "<head>" |
| HTMLHTML = HTML & "<meta http-equiv=""Content-Type""" |
| HTMLHTML = HTML & "content=""text/html; charset=iso-8859-1"">" |
| HTMLHTML = HTML & "<meta name=""GENERATOR""" |
| HTMLHTML = HTML & " content=""Microsoft Visual Studio 6.0"">" |
| HTMLHTML = HTML & "<title>HTMLMail</title>" |
| HTMLHTML = HTML & "</head>" |
| HTMLHTML = HTML & "<body bgcolor=""FFFFFF"">" |
| HTMLHTML = HTML & "<IMG SRC=""http://www.microsoft.com/library/" |
| HTMLHTML = HTML & "images/gifs/homepage/microsoft.gif"" BORDER=0 " |
| HTMLHTML = HTML & "WIDTH=167 HEIGHT=36 ALT=""Microsoft Corporation"">" |
| HTMLHTML = HTML & "<p><font size =""3"" face=""Arial""><strong>" |
| HTMLHTML = HTML & "Microsoft Exchange CDONTS Example</strong></p>" |
| HTMLHTML = HTML & "<p><font size =""2"" face=""Tahoma"">" |
| HTMLHTML = HTML & "CDO for NTS allows an easy way to send mail.<br>" |
| HTMLHTML = HTML & "This example shows how the content can be " |
| HTMLHTML = HTML & "an HTML page<br>" |
| HTMLHTML = HTML & "which allows you to send rich text and" |
| HTMLHTML = HTML & "inline graphics.</p>" |
| HTMLHTML = HTML & "</body>" |
| HTMLHTML = HTML & "</html>" |
| |
| myMail.From="someone@microsoft.com" |
| myMail.To="someone@microsoft.com" |
| myMail.Subject="Sample CDONTS HTML Message" |
| myMail.BodyFormat=0 |
| myMail.MailFormat=0 |
| myMail.Body=HTML |
| myMail.Send |
| set mymail=nothing |
| Response.Write "Message Sent" |
| |
| %> |
| |
Article ID: 316, Created: 4/24/2009 at 9:58 AM, Modified: 4/25/2009 at 11:09 AM