使用newLISP由SMTPserver发送电子邮件
2015-08-07 12:24
831 查看
直接使用的标准模块smtpx.lsp, smtp.lsp你可以不设置port,庭审后,没用。
以下是一个示例代码:
debug-flag设置为true是方便输出调试信息SMTP:get-error-text能够打印错误消息。
注意。上面的send-mail最后一个參数是指定的是port号。假设用qq邮箱发送email,不须要填写这个port号。
其它函数參考文档:
http://www.newlisp.org/code/modules/smtpx.lsp.html
以下是一个示例代码:
#!/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能够打印错误消息。
注意。上面的send-mail最后一个參数是指定的是port号。假设用qq邮箱发送email,不须要填写这个port号。
其它函数參考文档:
http://www.newlisp.org/code/modules/smtpx.lsp.html
相关文章推荐
- php AES加密兼容.net
- PHP中使用curl伪造IP的简单方法
- PHP 处理高并发问题
- PHP 实现文件强制下载
- PHP的array_map函数使用类内部方法作为回调函数的实现方式
- 【细说PHP学习】第十八章 MySQL数据表的设计
- ThinkPHP学习笔记( 一)安装配置
- php静态文件配置
- 生成MySQL数据字典的PHP脚本
- mountpoint
- php生成随机密码的几种方法
- (转)PHP中extract()函数的妙用
- 39. Element compareDocumentPosition() 方法
- yii2 多数据库操作
- 学PHP那点事?
- 如何在php配置xcache
- php正则表达式
- php获取当前时间
- php获取文件名
- PHP获取指定时间的上个月