用newLISP通过SMTP服务器发送邮件
用newLISP通过SMTP服务器发送邮件
用newLISP通过SMTP服务器发送邮件。直接使用标准模块smtpx.lsp, smtp.lsp不能设定端口,经过试用无用。
下面是例子代码:
#!/usr/bin/newlisp
(set 'debug-flag true)
(module "smtpx.lsp")
(set 'r (SMTP:send-mail "from@my.com"
"chenshu@letv.com"
"test"
"How are you today? - john doe -"
"smtp.myserver.com"
"myuser"
"mypasswd"
587))
(unless r
(println (SMTP:get-error-text)))
(exit)
debug-flag设置为true是方便输出调试信息
SMTP:get-error-text可以打印错误消息。
其他函数参考文档:
http://www.newlisp.org/code/modules/smtpx.lsp.html
newLISP 的详细介绍:请点这里
newLISP 的下载地址:请点这里
为Emacs配置newLISP开发环境
newLISP做GitLab系统备份
newLISP 遍历目录树,清理编译目录
本文永久更新链接地址:
评论暂时关闭