<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>WEB|WAP|网站建设|网站设计|网站制作|网站开发 - TOOL</title><link>http://www.hzzhit.com/blog/</link><description>兆合信息：专业的网站建设和网站制作公司 - </description><generator>RainbowSoft Studio Z-Blog 1.8 Arwen Build 81206</generator><language>zh-CN</language><copyright>Copyright 2008-2009 杭州兆合信息技术有限公司. All Rights Reserved.</copyright><pubDate>Tue, 07 Sep 2010 04:54:34 +0800</pubDate><item><title>cdonts+newmail对象参数说明及发送email实例</title><author>a@b.com (shine)</author><link>http://www.hzzhit.com/blog/tool/cdonts-newmail_6896.html</link><pubDate>Sun, 25 Oct 2009 16:08:30 +0800</pubDate><guid>http://www.hzzhit.com/blog/tool/cdonts-newmail_6896.html</guid><description><![CDATA[<p>&nbsp;</p><p>下载地址<a target="_blank" href="http://www.hzzhit.com/blog/upload/cdonts.rar">cdonts.rar</a></p><p style="line-height: 150%"><span lang="EN-US" style="font-size: 11pt; line-height: 150%"><font face="宋体">&lt;%<br />'Last Updated By Recon On <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="14" month="5" year="2001">05/14/2001</st1:chsdate><br />'On Error Resume Next<br /><br />'</font></span><span style="font-size: 11pt; line-height: 150%"><font face="宋体">利用<span lang="EN-US">CDONTS</span>组件在<span lang="EN-US">Win2k</span>上发送邮件</font><span lang="EN-US"><br /><font face="宋体">Dim objMail<br /><br />'</font></span><font face="宋体">普通邮件</font><span lang="EN-US"><br /><font face="宋体">'</font></span><font face="宋体">无主体</font><span lang="EN-US"><br /><font face="宋体">Set objMail = Server.CreateObject(&quot;CDONTS.NEWMAIL&quot;)<br />objMail.From&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@263.net&quot;<br />objMail.To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@21cn.com&quot;<br />objMail.Subject&nbsp;&nbsp;&nbsp; = &quot;TEST1&quot;<br />objMail.Send<br />Set objMail = Nothing<br /><br />'</font></span><font face="宋体">普通邮件</font><span lang="EN-US"><br /><font face="宋体">'</font></span><font face="宋体">有主体</font><span lang="EN-US"><br /><font face="宋体">Set objMail = Server.CreateObject(&quot;CDONTS.NEWMAIL&quot;)<br />objMail.From&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@263.net&quot;<br />objMail.To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@21cn.com&quot;<br />objMail.Subject&nbsp;&nbsp;&nbsp; = &quot;TEST2&quot;<br />objMail.Body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;When i was young, i listened to the radio ...&quot;<br />objMail.Send<br />Set objMail = Nothing<br /><br />'</font></span><font face="宋体">普通邮件</font><span lang="EN-US"><br /><font face="宋体">'</font></span><font face="宋体">有多送<span lang="EN-US">.</span>有主体</font><span lang="EN-US"><br /><font face="宋体">Set objMail = Server.CreateObject(&quot;CDONTS.NEWMAIL&quot;)<br />objMail.From&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@263.net&quot;<br />objMail.To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@21cn.com;iamchn@263.net&quot;<br />objMail.Subject&nbsp;&nbsp;&nbsp; = &quot;TEST3&quot;<br />objMail.Body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;When i was young, i listened to the radio ...&quot;<br />objMail.Send<br />Set objMail = Nothing<br /><br />'</font></span><font face="宋体">普通邮件</font><span lang="EN-US"><br /><font face="宋体">'</font></span><font face="宋体">有抄送<span lang="EN-US">.</span>有主体<span lang="EN-US">.</span>有重要性</font><span lang="EN-US"><br /><font face="宋体">Set objMail = Server.CreateObject(&quot;CDONTS.NEWMAIL&quot;)<br />objMail.From&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@263.net&quot;<br />objMail.To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@21cn.com&quot;<br />objMail.Cc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@263.net;recon_chan@sohu.com&quot;<br />objMail.Subject&nbsp;&nbsp;&nbsp; = &quot;TEST4&quot;<br />objMail.Body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;When i was young, i listened to the radio ...&quot;<br />objMail.Importance = 2<br />objMail.Send<br />Set objMail = Nothing<br /><br />'</font></span><font face="宋体">普通邮件</font><span lang="EN-US"><br /><font face="宋体">'</font></span><font face="宋体">有抄送<span lang="EN-US">.</span>有暗送<span lang="EN-US">.</span>有主体<span lang="EN-US">.</span>有重要性</font><span lang="EN-US"><br /><font face="宋体">Set objMail = Server.CreateObject(&quot;CDONTS.NEWMAIL&quot;)<br />objMail.From&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@263.net&quot;<br />objMail.To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@21cn.com&quot;<br />objMail.Cc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;recon_chan@sohu.com&quot;<br />objMail.Bcc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@263.net;recon_chan@sina.com&quot;<br />objMail.Subject&nbsp;&nbsp;&nbsp; = &quot;TEST5&quot;<br />objMail.Body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;When i was young, i listened to the radio ...&quot;<br />objMail.Importance = 2<br />objMail.Send<br />Set objMail = Nothing<br /><br />'</font></span><font face="宋体">普通邮件</font><span lang="EN-US"><br /><font face="宋体">'</font></span><font face="宋体">有主体<span lang="EN-US">.</span>有重要性<span lang="EN-US">.</span>含附件</font><span lang="EN-US"><br /><font face="宋体">Set objMail = Server.CreateObject(&quot;CDONTS.NEWMAIL&quot;)<br />objMail.From&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@263.net&quot;<br />objMail.To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@21cn.com&quot;<br />objMail.Subject&nbsp;&nbsp;&nbsp; = &quot;TEST6&quot;<br />objMail.Body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;When i was young, i listened to the radio ...&quot;<br />objMail.Importance = 2<br /><br />objMail.AttachFile &quot;C:\Love.txt&quot;<br />objMail.Send<br />Set objMail = Nothing<br /><br />'HTML</font></span><font face="宋体">邮件</font><span lang="EN-US"><br /><font face="宋体">'</font></span><font face="宋体">有主体<span lang="EN-US">.</span>有重要性</font><span lang="EN-US"><br /><font face="宋体">'</font></span><font face="宋体">注<span lang="EN-US">: AttachURL</span>的使用可能有错误</font><span lang="EN-US"><br /><font face="宋体">Dim fso, tf<br />Dim strHTML<br /><br />Set fso&nbsp;&nbsp;&nbsp; = Server.CreateObject(&quot;SCRIPTING.FILESYSTEMOBJECT&quot;)<br />Set tf&nbsp;&nbsp;&nbsp; = fso.OpenTextFile(&quot;C:\Mail.htm&quot;, 1)<br />strHTML = tf.ReadAll<br /><br />Write strHTML<br />Set tf&nbsp;&nbsp;&nbsp; = Nothing<br />Set fso&nbsp;&nbsp;&nbsp; = Nothing<br /><br />Set objMail = Server.CreateObject(&quot;CDONTS.NEWMAIL&quot;)<br />objMail.From&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@263.net&quot;<br />objMail.To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;iamchn@21cn.com&quot;<br />objMail.Subject&nbsp;&nbsp;&nbsp; = &quot;TEST7&quot;<br />objMail.Body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = strHTML<br /><br />objMail.BodyFormat&nbsp;&nbsp;&nbsp; = 0<br />objMail.MailFormat&nbsp;&nbsp;&nbsp; = 0<br />objMail.Importance&nbsp;&nbsp;&nbsp; = 2<br /><br />objMail.AttachURL &quot;c:\common.css&quot;, &quot;common.css&quot;<br />objMail.AttachURL &quot;c:\logo.gif&quot;, &quot;logo.gif&quot;<br />objMail.Send<br />Set objMail = Nothing<br />%&gt;<o:p></o:p></font></span></span></p><p style="line-height: 150%"><span lang="EN-US" style="font-size: 11pt; line-height: 150%"><font face="宋体">////////////////<br /></font></span><span style="font-size: 11pt; line-height: 150%"><font face="宋体">一个过程。另外<span lang="EN-US">CDONTS</span>在<span lang="EN-US">IIS5</span>下才可以使用的，你还必须配置你的<span lang="EN-US">SMTP</span>服务，在<span lang="EN-US">INTERNET</span>管理器里面有。</font><span lang="EN-US"><br /><font face="宋体">&lt;%<br />sub sendmail(fromwho,towho,subject,body)<br />dim cdo<br />set cdo=server.createobject(&quot;cdonts.newmail&quot;)<br />cdo.From=fromwho<br />cdo.To = towho<br />cdo.Subject =subject<br />cdo.Body =body<br />cdo.MailFormat=0<br />'</font></span><font face="宋体">说明是以<span lang="EN-US">MIME</span>发送</font><span lang="EN-US"><br /><font face="宋体">cdo.BodyFormat=0<br />'</font></span><font face="宋体">可以包含<span lang="EN-US">html</span>代码</font><span lang="EN-US"><br /><font face="宋体">cdo.Importance=0<br />'</font></span><font face="宋体">邮件的优先级别<st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="2" month="1" year="2000"><span lang="EN-US">0-1-2</span></st1:chsdate><br /><span lang="EN-US">'cdo.cc=xx@xx.net </span>抄送</font><span lang="EN-US"><br /><font face="宋体">'cdo.Bcc=xx@sf.net</font></span><font face="宋体">密送</font><span lang="EN-US"><br /><font face="宋体">'cdo.AttachFile &quot;&quot; </font></span><font face="宋体">附件</font><span lang="EN-US"><br /><font face="宋体">cdo.Send<br />Set cdo=Nothing<br />end sub<br />sub sendattachmail(fromwho,towho,subject,body,attachfile)<br />dim cdo<br />set cdo=server.createobject(&quot;cdonts.newmail&quot;)<br />cdo.From=fromwho<br />cdo.To = towho<br />cdo.Subject =subject<br />cdo.Body =body<br />cdo.MailFormat=0<br />cdo.BodyFormat=0<br />cdo.Importance=0<br />cdo.AttachFile attachfile<br />cdo.Send<br />Set cdo=Nothing<br />end sub<br />%&gt; <br /></font></span><font face="宋体">发送带附件的<span lang="EN-US">HTML</span>格式邮件例程</font><span lang="EN-US"><br /><br /><br /></span><font face="宋体">　　如何通过<span lang="EN-US"> ASP </span>来发送带附件、格式为<span lang="EN-US"> HTML </span>的邮件？下面提供了一个例程</font><font face="宋体"><span lang="EN-US">.<br /><br />&lt;%@ LANGUAGE=VBScript%&gt;<br />&lt;%<br />Response.Buffer = True<br />Response.Expires = 0<br /><br />'</span>创建对象实例</font><span lang="EN-US"><br /><font face="宋体">Set myMail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)<br /><br />'</font></span><font face="宋体">以下是将要发送的内容</font><span lang="EN-US"><br /><font face="宋体">HTML = &quot;&lt;html&gt;&quot;<br />HTML = HTML &amp; &quot;&lt;head&gt;&quot;<br />HTML = HTML &amp; &quot;&lt;title&gt;Sending CDONTS Email Using HTML&lt;/title&gt;&quot;<br />HTML = HTML &amp; &quot;&lt;/head&gt;&quot;<br />HTML = HTML &amp; &quot;&lt;body bgcolor=&quot;&quot;FFFFFF&quot;&quot;&gt;&quot;<br />HTML = HTML &amp; &quot;&lt;p&gt;&lt;font size=7&gt;&quot;<br />HTML = HTML &amp; &quot;This is a test mail in html&lt;br&gt;&quot;<br />HTML = HTML &amp; &quot;Mail content here ...&lt;/font&gt;&lt;/p&gt;&quot;<br />HTML = HTML &amp; &quot;&lt;/body&gt;&quot;<br />HTML = HTML &amp; &quot;&lt;/html&gt;&quot;<br /><br />'</font></span><font face="宋体">发件人</font><span lang="EN-US"><br /><font face="宋体">myMail.From = &quot;somebody@somewhere.com&quot;<br /><br />'</font></span><font face="宋体">收件人</font><span lang="EN-US"><br /><font face="宋体">myMail.To = &quot;nobody@somewhere.com&quot;<br /><br />'</font></span><font face="宋体">密件抄送</font><span lang="EN-US"><br /><font face="宋体">myMail.Bcc = &quot;nobody@somewhere.com&quot;<br /><br />'</font></span><font face="宋体">抄送</font><span lang="EN-US"><br /><font face="宋体">myMail.Cc = &quot;nobody@somewhere.com&quot;<br /><br />'</font></span><font face="宋体">邮件的重要性</font><span lang="EN-US"><br /><font face="宋体">' 0 </font></span><font face="宋体">重要性低</font><font face="宋体"><span lang="EN-US">&nbsp; <br />' 1 </span>重要性一般（默认）</font><font face="宋体"><span lang="EN-US"> <br />' 2 </span>重要性高</font><font face="宋体"><span lang="EN-US">&nbsp; <br />myMail.Importance = 2<br /><br />'</span>邮件主题</font><span lang="EN-US"><br /><font face="宋体">myMail.Subject = &quot;Test mail in HTML&quot;<br /><br />'</font></span><font face="宋体">附件（注意<span lang="EN-US"> e:\test.txt </span>指的是服务器上的位置，如果使用相对路径，必须用<span lang="EN-US"> Server.MapPath </span>映射为真实路径）</font><span lang="EN-US"><br /><font face="宋体">myMail.AttachFile &quot;e:\test.txt&quot;<br /><br />'NewMail </font></span><font face="宋体">对象的文字格式</font><span lang="EN-US"><br /><font face="宋体">'0 </font></span><font face="宋体">表示该<span lang="EN-US"> Body </span>可包含超文本置标语言</font><font face="宋体"><span lang="EN-US"> (HTML)<br />'1 </span>表示该<span lang="EN-US"> Body </span>只用于纯文本（默认值）</font><span lang="EN-US"><br /><font face="宋体">myMail.BodyFormat = 0<br /><br />'NewMail </font></span><font face="宋体">对象设置编码</font><span lang="EN-US"><br /><font face="宋体">'0 </font></span><font face="宋体">表示将采用<span lang="EN-US"> MIME </span>格式</font><span lang="EN-US"><br /><font face="宋体">'1 </font></span><font face="宋体">表示将采用连续的纯文本（默认值）</font><span lang="EN-US"><br /><font face="宋体">myMail.MailFormat = 0<br /><br />'</font></span><font face="宋体">给邮件对象的文本赋值</font><span lang="EN-US"><br /><font face="宋体">myMail.Body = HTML<br /><br />'</font></span><font face="宋体">将邮件发出</font><span lang="EN-US"><br /><font face="宋体">myMail.Send<br /><br />'</font></span><font face="宋体">销毁对象实例，释放内存</font><span lang="EN-US"><br /><font face="宋体">Set myMail = Nothing<br />%&gt;<br /><br /><br /></font></span><font face="宋体">用<span lang="EN-US">Cdonts</span>实现发送</font><font face="宋体"><span lang="EN-US">Email&nbsp; <br /><br />--------------------------------------------------------------------<br /><br /><br />&lt;%<br /></span>　　</font><font face="宋体"><span lang="EN-US">dim cdo<br /></span>　　</font><font face="宋体"><span lang="EN-US">set cdo=server.createobject(&quot;cdonts.newmail&quot;)<br /></span>　　<span lang="EN-US">cdo.From=fromwho&nbsp;&nbsp; &quot;</span>发件人信箱</font><span lang="EN-US"><br /></span><font face="宋体">　　<span lang="EN-US">cdo.To = towho&nbsp;&nbsp;&nbsp;&nbsp; &quot;</span>收件人信箱</font><span lang="EN-US"><br /></span><font face="宋体">　　<span lang="EN-US">cdo.Subject =subject&nbsp;&nbsp;&nbsp; &quot;</span>主题</font><span lang="EN-US"><br /></span><font face="宋体">　　<span lang="EN-US">cdo.Body =body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;</span>邮件正文</font><span lang="EN-US"><br /></span><font face="宋体">　　<span lang="EN-US">cdo.MailFormat=0</span>　　<span lang="EN-US">&quot;</span>说明是以<span lang="EN-US">MIME</span>发送</font><span lang="EN-US"><br /></span><font face="宋体">　　<span lang="EN-US">cdo.BodyFormat=0</span>　　<span lang="EN-US">&quot;</span>可以包含<span lang="EN-US">html</span>代码</font><span lang="EN-US"><br /></span><font face="宋体">　　<span lang="EN-US">cdo.Importance=0</span>　　<span lang="EN-US">&quot;</span>邮件的优先级别</font><font face="宋体"><span lang="EN-US">0-1-2<br /></span>　　<span lang="EN-US">cdo.cc=xx@xx.net </span>　<span lang="EN-US"> &quot;</span>抄送</font><span lang="EN-US"><br /></span><font face="宋体">　　<span lang="EN-US">cdo.Bcc=xx@sf.net</span>　<span lang="EN-US"> &quot;</span>密送</font><span lang="EN-US"><br /></span><font face="宋体">　　<span lang="EN-US">cdo.AttachFile attachfile&nbsp;&nbsp;&nbsp; &quot;</span>附件</font><span lang="EN-US"><br /></span><font face="宋体">　　</font><font face="宋体"><span lang="EN-US">cdo.Send<br /></span>　　</font><font face="宋体"><span lang="EN-US">Set cdo=Nothing<br />%&gt;<br /></span>下面我们看一个实例：</font><span lang="EN-US"><br /><font face="宋体">dim str&nbsp; <br />str=str&amp;&quot;</font></span><font face="宋体">您好</font><font face="宋体"><span lang="EN-US">!&quot;<br />str=str&amp;&quot;</span>　　由中国学生网所提供的劣质服务（<span lang="EN-US">ASP</span>服务器瘫痪），导致本站连继两天不能访问。</font><font face="宋体"><span lang="EN-US">&quot; <br />str=str&amp;&quot;</span>站长向这段时间不能访问本站的朋友深表歉意！本工作室也正在考虑更换网络提供商！</font><font face="宋体"><span lang="EN-US">&lt;br&gt;&quot;<br />str=str&amp;&quot;</span>　　本站永久域名：<span lang="EN-US">www.chinabs.net</span>　　主要面向<span lang="EN-US">B/S</span>技术爱好者。</font><font face="宋体"><span lang="EN-US">&lt;br&gt;&quot;<br />str=str&amp;&quot;</span>　　建站的目的是为<span lang="EN-US">B/S</span>爱好者提供一个学习交流的平台，同时也为商家建立企业上网平<span lang="EN-US">&quot; str=str&amp;&quot;</span>台，企业内部<span lang="EN-US">B/S</span>应用提供解决方案。</font><font face="宋体"><span lang="EN-US">&lt;br&gt;&quot;<br />str=str&amp;&quot;</span>　　主要内容包括：<span lang="EN-US">ASP,ASP.NET,JSP,PHP,C#,Java,JavaScript,XML</span>学习文章，<span lang="EN-US">B/S</span>技术<span lang="EN-US">&quot; str=str&amp;&quot;</span>交流论坛及一些本工作室开发的一些<span lang="EN-US">B/S</span>应用。</font><font face="宋体"><span lang="EN-US">&lt;br&gt;&quot;<br />str=str&amp;&quot;</span>　　本站的发展离不开大家的支持！</font><font face="宋体"><span lang="EN-US">&lt;br&gt;&quot;<br />str=str&amp;&quot;</span>　　谢谢！</font><font face="宋体"><span lang="EN-US">&lt;br&gt;&quot;<br />str=str&amp;&quot; </span>站长：追风</font><font face="宋体"><span lang="EN-US">&lt;br&gt;&quot;<br />str=str&amp;&quot; </span>深圳比艾思工作室</font><font face="宋体"><span lang="EN-US">&lt;br&gt;&quot;<br />filename=&quot;test.gif&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;</span>附件文件名</font><span lang="EN-US"><br /><font face="宋体">path=Server.MapPath(&quot;\jefenet\images\&quot; &amp; filename)&nbsp;&nbsp;&nbsp;&nbsp; &quot;</font></span><font face="宋体">附件的路径</font><span lang="EN-US"><br /><font face="宋体">Set theMail=Server.CreateObject(&quot;CDONTS.NewMail&quot;) <br />theMail.From=&quot;chinabs@263.net&quot; </font></span><font face="宋体">　　<span lang="EN-US">&quot;</span>发件人信箱</font><span lang="EN-US"><br /><font face="宋体">theMail.To =&quot;jeffzb@21cn.com&quot;</font></span><font face="宋体">　　　<span lang="EN-US">&quot;</span>收件人信箱</font><span lang="EN-US"><br /><font face="宋体">theMail.Subject =&quot;</font></span><font face="宋体">电子邮件功能测试！<span lang="EN-US">&quot; </span>　　<span lang="EN-US">&quot;</span>主题</font><span lang="EN-US"><br /><font face="宋体">theMail.BodyFormat=0</font></span><font face="宋体">　　　<span lang="EN-US">&quot;</span>定义以<span lang="EN-US">Html</span>的格式发送邮件</font><span lang="EN-US"><br /><font face="宋体">theMail.MailFormat=0 </font></span><font face="宋体">　　<span lang="EN-US"> &quot;</span>定义以<span lang="EN-US">Mime</span>的格式发邮件</font><span lang="EN-US"><br /><font face="宋体">theMail.Body=Str </font></span><font face="宋体">　　　　<span lang="EN-US"> &quot;</span>邮件正文</font><span lang="EN-US"><br /><font face="宋体">On Error Resume Next&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;</font></span><font face="宋体">如果找不到附件，则跳过</font><span lang="EN-US"><br /><font face="宋体">theMail.AttachFile path,filename <br />theMail.Send<br />set theMail=nothing <o:p></o:p></font></span></span></p><p style="line-height: 150%"><span lang="EN-US" style="font-size: 11pt; line-height: 150%"><font face="宋体">--------------------------------------------<o:p></o:p></font></span></p><p style="line-height: 150%"><span style="font-size: 11pt; line-height: 150%"><font face="宋体">注意</font><font face="宋体"><span lang="EN-US">:<br />theMail.AttachFile </span>第一个参数为服务器实际路径，第二个参数为邮件中显示的文件名<span lang="EN-US"><o:p></o:p></span></font></span></p><p>&nbsp;</p>]]></description><category>TOOL</category><comments>http://www.hzzhit.com/blog/tool/cdonts-newmail_6896.html#comment</comments><wfw:comment>http://www.hzzhit.com/blog/</wfw:comment><wfw:commentRss>http://www.hzzhit.com/blog/feed.asp?cmt=108</wfw:commentRss><trackback:ping>http://www.hzzhit.com/blog/cmd.asp?act=tb&amp;id=108&amp;key=e0369573</trackback:ping></item><item><title>Mysql ODBC驱动包 5.1 For WIN32</title><author>a@b.com (shine)</author><link>http://www.hzzhit.com/blog/tool/Mysql-ODBC-driver.html</link><pubDate>Fri, 17 Jul 2009 12:32:18 +0800</pubDate><guid>http://www.hzzhit.com/blog/tool/Mysql-ODBC-driver.html</guid><description><![CDATA[<p>MySql ODBC驱动的使用</p><p>我们经常会遇到这样问题，怎样在非web程序或asp程序中使用mysql数据库呢？对于这个问题有两个解决方案: 　　</p><p><font color="#000000">　　1.使用mysql提供的api函数库。 　　 </font></p><p><font color="#000000">　　很多有名的mysql客户端工具就是这样实现的，大名鼎鼎的winmysql工具就是这样的。这在大部分的开发工具中都可以实现。比如vc,bcb,delphi,vb等，只要能调用第三方的api就能实现。但对程序员的要求很高，而且要熟悉一套mysql的api函数集，这不是对每个人都很轻松的事。而且这种方法不能用于asp等程序，因为它不支持com对象。 　　 </font></p><p><font color="#000000">　　2。第二种是使用myodbc驱动程序。 　　 </font></p><p><font color="#000000">　　你可以到</font><font color="#000000">www.mysql.com</font><font color="#000000">下载myodbc驱动程序，然后照着下面的做就可以了第一种选择是下载完全安装包，这种包很大，但对于我们来说有用的只有myodbc.dll这个文件，却要下载这么大的文件，不太合适。当然，如果你很菜的话，我建议你选择这种方式，这样容易些，但不符合cfans的作风，是吧。 </font></p><p><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本公司已经把该驱动存放在公司服务器，您可以直接下载，请点击这里下载：<a target="_blank" href="http://www.hzzhit.com/blog/tool/mysql-connector-odbc-noinstall-5.1.5-win32.zip">mysql odbc 5.1下载</a></font></p><p><font color="#000000">　　第二种是直接下载myodbc.dll文件，只有几百k,但不太容易使用，本人经过很久摸索才找到使用它的方法。首先你将包解开，将myodbc.dll 文件放到windowssystem 或 winntsystem32目录下，这取决于你的系统是win9x还是winnt(win2k)，你应该知道吧。 　　 </font></p><p><font color="#000000">　　然后打开一纯文本编辑器，如editplus,notpad之类，(取决于你的喜好)将下面一段话保存为一文件，扩展名为.reg,知道了吧，这是注册表文件，不要搞错呀(不包括下面的一长串等号) 　　 </font></p><p><font color="#000000">　　如果你用的是win2k请将第一行换成 　　 </font></p><p><font color="#000000">　　Windows Registry Editor Version 5.00 　 </font></p><p><font color="#000000">　　==========================================================从下行开始 　　 </font></p><p><font color="#000000">　　Windows Registry Editor Version 4.00 　　 </font></p><p><font color="#000000">　　[HKEY_LOCAL_MACHINESOFTWAREODBCODBCINST.INImyodbc driver] </font></p><p><font color="#000000">　　&quot;UsageCount&quot;=dword:00000002 </font></p><p><font color="#000000">　　&quot;Driver&quot;=&quot;C:\WINNT\System32\myodbc.dll&quot; </font></p><p><font color="#000000">　　&quot;Setup&quot;=&quot;C:\WINNT\System32\myodbc.dll&quot; </font></p><p><font color="#000000">　　&quot;SQLLevel&quot;=&quot;1&quot; </font></p><p><font color="#000000">　　&quot;FileUsage&quot;=&quot;0&quot; </font></p><p><font color="#000000">　　&quot;DriverODBCVer&quot;=&quot;02.50&quot; </font></p><p><font color="#000000">　　&quot;ConnectFunctions&quot;=&quot;YYY&quot; </font></p><p><font color="#000000">　　&quot;APILevel&quot;=&quot;1&quot; </font></p><p><font color="#000000">　　&quot;CpTimeout&quot;=&quot;120&quot; </font></p><p><font color="#000000">　　[HKEY_LOCAL_MACHINESOFTWAREODBCODBCINST.INIODBC Drivers] </font></p><p><font color="#000000">　　&quot;myodbc driver&quot;=&quot;installed&quot;</font></p><p><strong><font color="#000000">==================================================</font></strong></p><p><strong><font color="#000000">MySQL到ORACLE程序迁移的注意事项</font></strong></p><p><br /><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 有很多应用项目, 刚起步的时候用MYSQL数据库基本上能实现各种功能需求，随着应用用户的增多，数据量的增加，MYSQL渐渐地出现不堪重负的情况：连接很慢甚至宕机，于是就有把数据从MYSQL迁到ORACLE的需求，应用程序也要相应做一些修改。<br /><strong>1． 自动增长的数据类型处理</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MYSQL有自动增长的数据类型，插入记录时不用操作此字段，会自动获得数据值。ORACLE没有自动增长的数据类型，需要建立一个自动增长的序列号，插入记录时要把序列号的下一个值赋于此字段。<br />CREATE SEQUENCE 序列号的名称 (最好是表名+序列号标记) INCREMENT BY 1 START WITH 1 MAXVALUE 99999 CYCLE NOCACHE;<br />其中最大的值按字段的长度来定, 如果定义的自动增长的序列号 NUMBER(6) , 最大值为999999<br />INSERT 语句插入这个字段值为: 序列号的名称.NEXTVAL<br /></font><font color="#000000"><strong>2. 单引号的处理<br /></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MYSQL里可以用双引号包起字符串，ORACLE里只可以用单引号包起字符串。在插入和修改字符串前必须做单引号的替换：把所有出现的一个单引号替换成两个单引号。<br /></font><font color="#000000"><strong>3. 翻页的SQL语句的处理<br /></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MYSQL处理翻页的SQL语句比较简单，用LIMIT 开始位置, 记录个数；PHP里还可以用SEEK定位到结果集的位置。ORACLE处理翻页的SQL语句就比较繁琐了。每个结果集只有一个ROWNUM字段标明它的位置, 并且只能用ROWNUM&lt;100, 不能用ROWNUM&gt;80。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 以下是经过分析后较好的两种ORACLE翻页SQL语句( ID是唯一关键字的字段名 )：<br />语句一：<br />SELECT ID, [FIELD_NAME,...] FROM TABLE_NAME WHERE ID IN ( SELECT ID FROM (SELECT ROWNUM AS NUMROW, ID FROM TABLE_NAME WHERE 条件1 ORDER BY 条件2) WHERE NUMROW &gt; 80 AND NUMROW &lt; 100 ) ORDER BY 条件3; <br />语句二：<br />SELECT * FROM (( SELECT ROWNUM AS NUMROW, c.* from (select [FIELD_NAME,...] FROM TABLE_NAME WHERE 条件1 ORDER BY 条件2) c) WHERE NUMROW &gt; 80 AND NUMROW &lt; 100 ) ORDER BY 条件3;<br /><strong>4． 长字符串的处理</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 长字符串的处理ORACLE也有它特殊的地方。INSERT和UPDATE时最大可操作的字符串长度小于等于4000个单字节, 如果要插入更长的字符串, 请考虑字段用CLOB类型，方法借用ORACLE里自带的DBMS_LOB程序包。插入修改记录前一定要做进行非空和长度判断，不能为空的字段值和超出长度字段值都应该提出警告,返回上次操作。<br /><strong>5. 日期字段的处理</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MYSQL日期字段分DATE和TIME两种，ORACLE日期字段只有DATE，包含年月日时分秒信息，用当前数据库的系统时间为SYSDATE, 精确到秒，或者用字符串转换成日期型函数TO_DATE(&lsquo;2001-08-01&rsquo;,&rsquo;YYYY-MM-DD&rsquo;)年-月-日 24小时:分钟:秒 的格式YYYY-MM-DD HH24:MI:SS TO_DATE()还有很多种日期格式, 可以参看ORACLE DOC.日期型字段转换成字符串函数TO_CHAR(&lsquo;2001-08-01&rsquo;,&rsquo;YYYY-MM-DD HH24:MI:SS&rsquo;)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 日期字段的数学运算公式有很大的不同。MYSQL找到离当前时间7天用 DATE_FIELD_NAME &gt; SUBDATE（NOW（），INTERVAL 7 DAY）ORACLE找到离当前时间7天用 DATE_FIELD_NAME &gt;SYSDATE - 7;<br /><strong>6. 空字符的处理</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MYSQL的非空字段也有空的内容，ORACLE里定义了非空字段就不容许有空的内容。按MYSQL的NOT NULL来定义ORACLE表结构, 导数据的时候会产生错误。因此导数据时要对空字符进行判断，如果为NULL或空字符，需要把它改成一个空格的字符串。<br /><strong>7. 字符串的模糊比较</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MYSQL里用 字段名 like '%字符串%',ORACLE里也可以用 字段名 like '%字符串%' 但这种方法不能使用索引, 速度不快，用字符串比较函数 instr(字段名,'字符串')&gt;0 会得到更精确的查找结果。<br /><strong>8. 程序和函数里，操作数据库的工作完成后请注意结果集和指针的释放。</strong></font></p>]]></description><category>TOOL</category><comments>http://www.hzzhit.com/blog/tool/Mysql-ODBC-driver.html#comment</comments><wfw:comment>http://www.hzzhit.com/blog/</wfw:comment><wfw:commentRss>http://www.hzzhit.com/blog/feed.asp?cmt=84</wfw:commentRss><trackback:ping>http://www.hzzhit.com/blog/cmd.asp?act=tb&amp;id=84&amp;key=96457709</trackback:ping></item><item><title>Xenu-死链接检测工具</title><author>a@b.com (shine)</author><link>http://www.hzzhit.com/blog/tool/Xenu.html</link><pubDate>Fri, 27 Mar 2009 17:41:48 +0800</pubDate><guid>http://www.hzzhit.com/blog/tool/Xenu.html</guid><description><![CDATA[<p>Xenu 是一款深受业界好评，并被广泛使用的死链接检测工具。</p><p>时常检测网站并排除死链接，对网站的 SEO&nbsp;非常重要，因为大量死链接存在会降低用户和搜索引擎对网站的信任。</p><p>我们推荐的死链接检测工具 Xenu 主要具有以下特征：</p><ul>    <li>需要下载安装，不到1M大小，用户界面非常简洁，操作简单。</li>    <li>检测彻底：能够检测到图片、框架、插件、背景、样式表、脚本和 java 程序中的链接。</li>    <li>报告形式合理多样，死链接一目了然。</li>    <li>提供出现死链接的网页，方便扫除导出链接错误。</li>    <li>能够侦测重定向URL</li>    <li>可以选择是否侦测站外链接。</li>    <li>对于小型简单网站，可以用来制作HTML格式网站地图。</li></ul><p>&nbsp;</p><p>死链接检测工具 Xenu 下载地址：<a target="_blank" href="http://home.snafu.de/tilman/XENU.ZIP">http://home.snafu.de/tilman/XENU.ZIP</a></p><p>不懂英文者使用指南：</p><ol>    <li>下载，并安装。</li>    <li>打开后，出现 Tips and Tricks 窗口，点击 Close 按钮。</li>    <li>点击左上第二行第一个按钮。</li>    <li>出现一个对话框，在对话框第一行，写入自己的URL。如：<a target="_blank" href="http://www.hzzhit.com">http://www.hzzhit.com</a><br />    按底部的&ldquo;OK&rdquo;，就完成了。</li>    <li>报告结果中，出现红色的部分即是死链接。</li></ol>]]></description><category>TOOL</category><comments>http://www.hzzhit.com/blog/tool/Xenu.html#comment</comments><wfw:comment>http://www.hzzhit.com/blog/</wfw:comment><wfw:commentRss>http://www.hzzhit.com/blog/feed.asp?cmt=25</wfw:commentRss><trackback:ping>http://www.hzzhit.com/blog/cmd.asp?act=tb&amp;id=25&amp;key=7871a76c</trackback:ping></item><item><title>新网站收录入口(百度收录入口,google收录入口,雅虎收录入口,Live Search收录入口..)</title><author>a@b.com (shine)</author><link>http://www.hzzhit.com/blog/tool/wangzhantijiao.html</link><pubDate>Sun, 22 Feb 2009 20:13:47 +0800</pubDate><guid>http://www.hzzhit.com/blog/tool/wangzhantijiao.html</guid><description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp; 建好网站，当然要让搜索引擎收录后，才能让更多的人来访问，因此，说一下比较老的话题，其实网站推广的第一步，就是让搜索引擎收录，这也是使用独立顶级域名和空间建网站的原因之一。</p><p><span style="font-size: medium">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 所谓搜索引擎登录，以前是需要提供一下网站内容，现在比较简单了，只需要简单的把网站提交给搜索引擎即可。只要你站的内容不断更新，而且有意义，搜索机噐人就会定期不定期的造访您的网站。</span></p><p><span style="font-size: medium"><br />新站登录快速入口：</span></p><p><a title="" target="_blank" title2="百度新站登录入口" tipbodercolor="#608ce6" tiptitle="相关提示" tipicon="info" tipmsg="百度新站登录入口" href="http://www.baidu.com/search/url_submit.htm"><font color="#006600">百度新站提交</font></a> <br /><a title="" target="_blank" title2="Google新站登录入口" tipbodercolor="#608ce6" tiptitle="相关提示" tipicon="info" tipmsg="Google新站登录入口" href="http://www.google.com/addurl/?hl=zh-CN&amp;continue=/addurl"><font color="#006600">Google新站提交</font></a> <br /><a title="" target="_blank" title2="雅虎新站登录入口" tipbodercolor="#608ce6" tiptitle="相关提示" tipicon="info" tipmsg="雅虎新站登录入口" href="http://search.help.cn.yahoo.com/h4_4.html"><font color="#006600">yahoo新站提交 </font></a><br /><a title="" target="_blank" title2="msn新站登录入口" tipbodercolor="#608ce6" tiptitle="相关提示" tipicon="info" tipmsg="msn新站登录入口" href="http://search.msn.com/docs/submit.aspx?FORM=WSDD2"><font color="#006600">Live Search新站提交</font></a> <br /><a title="" target="_blank" title2="有道新站登录入口" tipbodercolor="#608ce6" tiptitle="相关提示" tipicon="info" tipmsg="有道新站登录入口" href="http://tellbot.yodao.com/report"><font color="#006600">有道新站提交</font></a> <br /><a title="" target="_blank" title2="中搜新站登录入口" tipbodercolor="#608ce6" tiptitle="相关提示" tipicon="info" tipmsg="中搜新站登录入口" href="http://ads.zhongsou.com/register/page.jsp"><font color="#006600">中搜新站提交</font></a> <br /><a title="" target="_blank" title2="TOM新站登录入口" tipbodercolor="#608ce6" tiptitle="相关提示" tipicon="info" tipmsg="TOM新站登录入口" href="http://search.tom.com/tools/weblog/log.php"><font color="#006600">TOM新站提交</font></a></p>]]></description><category>TOOL</category><comments>http://www.hzzhit.com/blog/tool/wangzhantijiao.html#comment</comments><wfw:comment>http://www.hzzhit.com/blog/</wfw:comment><wfw:commentRss>http://www.hzzhit.com/blog/feed.asp?cmt=14</wfw:commentRss><trackback:ping>http://www.hzzhit.com/blog/cmd.asp?act=tb&amp;id=14&amp;key=b5a489ca</trackback:ping></item><item><title>网站制作会用到的一些辅助工具</title><author>a@b.com (shine)</author><link>http://www.hzzhit.com/blog/tool/6.html</link><pubDate>Sun, 15 Feb 2009 20:16:56 +0800</pubDate><guid>http://www.hzzhit.com/blog/tool/6.html</guid><description><![CDATA[<p>平时制作网站时总结收集的一些辅助工具，希望大家能用到。。。。<br />1.itfontMaker&mdash;&mdash;字体制作 <a href="http://pentacom.jp/soft/ex/font/edit.html">http://pentacom.jp/soft/ex/font/edit.html</a> <br />2.钱币生成器　<a href="http://www.onlinewahn.de/generator/m-make">http://www.onlinewahn.de/generator/m-make</a> <br />3.图片仓库：　<a href="http://pic.sdodo.com">http://pic.sdodo.com</a> <br />3.1.图片缩放裁切工具　<a href="http://pic.sdodo.com/tool/picadjust">http://pic.sdodo.com/tool/picadjust</a> <br />3.2.大头贴DIY工具　<a href="http://pic.sdodo.com/tool/hphoto">http://pic.sdodo.com/tool/hphoto</a> <br />3.3.给图片加字工具　<a href="http://pic.sdodo.com/tool/addword">http://pic.sdodo.com/tool/addword</a> <br />3.4.邮箱地址小图标工具　<a href="http://pic.sdodo.com/tool/mailpic">http://pic.sdodo.com/tool/mailpic</a> <br />3.5.给图片加小标签　<a href="http://pic.sdodo.com/tool/piclabel">http://pic.sdodo.com/tool/piclabel</a>&nbsp; <br />4.在线FLASH动画制作　<a href="http://www.dfilm.com/index_movie_start.html">http://www.dfilm.com/index_movie_start.html</a> <br />5.图片生成网页图标　<a href="http://www.chami.com/html-kit/services/favicon">http://www.chami.com/html-kit/services/favicon</a> <br />6.由蝌蚪网络提供的Gmail注册入口　<a href="http://cnc.kedooo.net/gmail">http://cnc.kedooo.net/gmail</a>&nbsp; <br />7.最全的邮件/QQ/MSN/BLOG图片生成器　<a href="http://www.eoool.com">http://www.eoool.com</a> <br />8.收藏夹图标生成器　<a href="http://www.html-kit.com/e/favicon.cgi">http://www.html-kit.com/e/favicon.cgi</a> <br />9.在线域名LOGO生成　<a href="http://phorum.com.tw/Generator.aspx">http://phorum.com.tw/Generator.aspx</a> <br />10.免费3D banner在线制做网站　<a href="http://www.3dtextmaker.com/cgi-bin/3dtext.pl">http://www.3dtextmaker.com/cgi-bin/3dtext.pl</a> <br />11.输入图片就能查看字体　<a href="http://www.myfonts.com/WhatTheFont">http://www.myfonts.com/WhatTheFont</a> <br />12.sitemap网站地图制作工具　<a href="http://www.seo.net.cn/sitemap4">http://www.seo.net.cn/sitemap4</a> <br />13.检测空间商好坏的方法　<a href="http://uptime.netcraft.com/up">http://uptime.netcraft.com/up</a> <br />14.查看该域名IP主机下的其他域名　<a href="http://whois.webhosting.info">http://whois.webhosting.info</a> <br />15.生成email图片　<a href="http://www.nhacks.com/email/index.php">http://www.nhacks.com/email/index.php</a> <br />16.世界网络里面有很多不错的测试　<a href="http://www.linkwan.com/gb/broadmeter">http://www.linkwan.com/gb/broadmeter</a> <br />17.几个大城市的地图搜索　<a href="http://map.zhongsou.com">http://map.zhongsou.com</a> <br />18.图片标签快速生成工具　<a href="http://www.eoool.com">http://www.eoool.com</a> <br />19.查询在google所有服务器中的PR值 <a href="http://www.iwebtool.com/pagerank_checker?domain=www.05371.com">http://www.iwebtool.com/pagerank_checker?domain=www.05371.com</a><br />20.免费加入140个搜索引擎　<a href="http://freehosting.hostrave.com/p/ledbetter/submitware/index.php">http://freehosting.hostrave.com/p/ledbetter/submitware/index.php</a>&nbsp; <br />21.在线生成多种样式的LOGO　<a href="http://sherlocco.com/create.asp">http://sherlocco.com/create.asp</a> <br />22.街道路牌签名生成器　<a href="http://www.streetsigngenerator.com">http://www.streetsigngenerator.com</a> <br />&nbsp;</p>]]></description><category>TOOL</category><comments>http://www.hzzhit.com/blog/tool/6.html#comment</comments><wfw:comment>http://www.hzzhit.com/blog/</wfw:comment><wfw:commentRss>http://www.hzzhit.com/blog/feed.asp?cmt=6</wfw:commentRss><trackback:ping>http://www.hzzhit.com/blog/cmd.asp?act=tb&amp;id=6&amp;key=773fdd84</trackback:ping></item></channel></rss>
