惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
J
Java Code Geeks
D
DataBreaches.Net
B
Blog RSS Feed
D
Docker
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Y
Y Combinator Blog
A
About on SuperTechFans
V
V2EX
罗磊的独立博客
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
博客园 - 【当耐特】
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题
月光博客
月光博客
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
阮一峰的网络日志
阮一峰的网络日志

月光博客

AI编程从零开始:环境配置到开发调试-月光博客 母亲被保健品诈骗-月光博客 向身体低头,向岁月妥协:我的高血压“还债日记” -月光博客 月光博客电子书:《信息安全指南》 谷歌发布2025年度搜索排行榜 中国2025社会热点大事记 2025年十大流行语发布 7天3次,骗子骗走我母亲95万元 “技术男”设三重安全墙,母亲95万存款还是被骗走了 电信诈骗后的复盘:母亲的95万元,是怎么从手机银行里消失的 母亲被电信诈骗95万元的全过程 阿根廷警察被谷歌街景相机拍到裸照 网信办开展“清朗·整治恶意挑动负面情绪问题”专项行动 翟欣欣敲诈勒索案一审获刑12年 《绝命毒师》影评:力工觉醒后的梭哈至死 《人工智能生成合成内容标识办法》正式施行 用AI分析你的财务信息 腾讯子公司实习HR怒怼求职者后被开除 OpenAI发布最强模型GPT-5,免费向所有用户开放 用AI解构你的日记 用AI分析你的游戏偏好 用AI分析你的观影偏好 用AI分析你的听歌偏好 《白鹿原》人物分析:乱世浮沉中的人性剖析 乌托邦的捷径:让AI治理“失败国家” 苹果AI的“路径错误”:为什么它在大模型时代掉队了? 《暗黑破坏神3》第35赛季开荒指南 我对特朗普的看法 欧·亨利十大经典小说鉴赏 HBO电视剧《最后生还者》第二季影评
Z-Blog发送邮件插件的修改
月光 · 2008-12-20 · via 月光博客

先前我曾经介绍过一个Z-Blog发送邮件插件的插件,可以用于发送邮件到邮件列表,用于邮件订阅博客。其实这个插件还有一个功能,就是自动同步日志到Google Blogspot和MSN Live Spaces上面的博客。

由于Google Blogspot和MSN Live Spaces都支持电子邮件的发布,因此将发布邮件地址加入到插件的收信人,并以逗号分隔即可,经过我的测试,原始的程序发送过程中,中文会出现乱码,我将该插件代码修改了一下,经过我的实际测试,发送到Blogspot上的邮件已经没有乱码了,以下是修改后的include.asp文件,请替换修改即可。

Const MailPost_MailTo="[email protected],[email protected]"
Const MailPost_MailFrom="[email protected]"
Const MailPost_SmtpServer="127.0.0.1"
Const MailPost_uname=""
Const MailPost_upass=""
Dim MailPost_objArticle
Dim isNew
'注册插件
Call RegisterPlugin("MailPost","ActivePlugin_MailPost")
'具体的接口挂接
Function ActivePlugin_MailPost()
 '挂上接口
 Call Add_Action_Plugin("Action_Plugin_ArticlePst_Begin","Call MailPost_Main()")
End Function
Function MailPost_getArticle(ByRef objArticle)
 Set MailPost_objArticle=objArticle
 If MailPost_objArticle.ID = "0" Then
  isNew=True
 Else
  isNew=False
 End If
End Function
Function MailPost_gotoPingTB()
 If isNew Then
 Call Send_Email(MailPost_SmtpServer,MailPost_MailFrom,MailPost_uname,MailPost_upass,MailPost_MailTo,"MailPost",MailPost_objArticle.title,MailPost_objArticle.content & " ")
 End If
End Function
Function MailPost_Main()
 Call Add_Filter_Plugin("Filter_Plugin_PostArticle_Core","MailPost_getArticle")
 Call Add_Action_Plugin("Action_Plugin_ArticlePst_Succeed","Call MailPost_gotoPingTB()")
End Function
Function Send_Email(smtpHost,FromEmail,smtpUser,smtpPass,mailTo,FromName,subject,content)
 '处理收件人
 If InStr(mailTo,",")<1 Then
  mailTo=mailTo &","
 End If
 Dim tos,i
 tos = Split(mailTo,",")
 Dim jmail
 Set jmail = Server.CreateObject("JMAIL.Message")
 jmail.silent = true
 jmail.logging = true
 'jmail.ContentType = "text/html"
 jmail.Charset = "GB2312" 
 jmail.ContentTransferEncoding = "base64"
 Jmail.ISOEncodeHeaders = True
 For i = LBound(tos) To UBound(tos)
  If tos(i)<>"" Then jmail.AddRecipient tos(i)
 Next
 jmail.From = FromEmail
 jmail.FromName = FromName
 jmail.Subject = subject
 jmail.HTMLBody = content
 jmail.Priority = 1
 jmail.MailServerUserName = smtpUser
 jmail.MailServerPassword = smtpPass
 jmail.Send(smtpHost)
 jmail.Close()
End Function
 

Z-Blog发送邮件插件的修改