aardio 文档

inet.smtp 库模块帮助文档

inet 成员列表

inet.smtp

邮件发送支持库

inet.smtp()

创建邮件发送对象

返回对象:inetsmtpObject

inetsmtpObject 成员列表

inetsmtpObject.addAttachment(path)

添加附件

inetsmtpObject.addBCCRecipient(email, name)

添加密件抄送地址
BCC是blind carbon copy的缩写,意指收件人看不到其他收件人

inetsmtpObject.addCCRecipient(email, name)

添加密件抄送地址
CC是carbon copy的缩写

inetsmtpObject.addMsgLine(text)

添加待发送文本行

inetsmtpObject.addRecipient(email,name)

添加收件地址

inetsmtpObject.clearMessage()

清空邮件待发送文本、附件、收件地址等等

inetsmtpObject.delAttachments()

清空附件

inetsmtpObject.delBCCRecipients()

清空密件抄送地址

inetsmtpObject.delCCRecipients()

清空抄送地址

inetsmtpObject.delMsgLine(行号)

删除待发送文本行,参数为数值行号

inetsmtpObject.delMsgLines()

清空所有待发送文本行

inetsmtpObject.delRecipients()

清空收件人

inetsmtpObject.getBCCRecipientCount()

密送地址总数

inetsmtpObject.getCCRecipientCount()

抄送地址总数

inetsmtpObject.getErrorNum()

返回错误代码

inetsmtpObject.getErrorText()

返回错误描述

inetsmtpObject.getLastRequest()

返回最后发送的请求文本

inetsmtpObject.getLastResponse()

返回服务器最后返回的文本

inetsmtpObject.getLastResponseCode()

返回服务器最后响应代码

inetsmtpObject.getLocalHostName()

获取EHLO主机名

inetsmtpObject.getMailFrom()

发件人地址

inetsmtpObject.getMsgLineText(行号)

获取指定行待发送文本

inetsmtpObject.getMsgLines()

获取待发送文本总行数

inetsmtpObject.getRecipientCount()

收件地址总数

inetsmtpObject.getReplyTo()

getReplyTo

inetsmtpObject.getSecurityType()

获取安全协议类型

inetsmtpObject.getSenderName()

发件人名字

inetsmtpObject.getSubject()

邮件标题

inetsmtpObject.getXMailer()

邮件发送程序名

inetsmtpObject.getXPriority()

邮件优先级

inetsmtpObject.modMsgLine(行号,文本内容)

修改指定行的待发送文本

inetsmtpObject.send()

发送邮件

inetsmtpObject.setBodyHtml(HTML)

重新设置HTML格式邮件内容

inetsmtpObject.setBodyText(文本)

重新设置文本格式邮件内容

inetsmtpObject.setCharSet("gbk")

编码

inetsmtpObject.setHtmlFormat(true)

邮件使用HTML格式

inetsmtpObject.setLocalHostName(localHostName)

设置EHLO主机名

inetsmtpObject.setLogin("用户名")

设置邮件服务器登录用户名

inetsmtpObject.setPassword("密码")

设置邮件服务器登录密码

inetsmtpObject.setReadReceipt(true)

要求发送已读回执

inetsmtpObject.setReplyTo(string)

设置

inetsmtpObject.setSMTPServer("主机名",端口,是否认证)

设置邮件服务器
端口一般为25,SSL端口为465

inetsmtpObject.setSecurityType(_INETSMTP_SECURITY)

设置安全协议类型

inetsmtpObject.setSecurityTypeSSL()

使用TLS加密协议

inetsmtpObject.setSecurityTypeTLS()

使用SSL加密协议

inetsmtpObject.setSenderMail(string)

设置

inetsmtpObject.setSenderName(string)

设置

inetsmtpObject.setSubject(string)

设置邮件标题

inetsmtpObject.setXMailer("邮件发送程序名")

邮件发送程序名

inetsmtpObject.setXPriority(_INETSMTP_XPRIORITY)

设置优先级

自动完成常量

_INETSMTPE_BAD_DIGEST_RESPONSE=0xCF
_INETSMTPE_BAD_IPV4_ADDR=0x6E
_INETSMTPE_BAD_LOGIN_PASS=0x196
_INETSMTPE_BAD_LOGIN_PASSWORD=0xCE
_INETSMTPE_BAD_SERVER_NAME=0xD0
_INETSMTPE_COMMAND_AUTH_CRAMMD5=0x130
_INETSMTPE_COMMAND_AUTH_DIGESTMD5=0x131
_INETSMTPE_COMMAND_AUTH_LOGIN=0x12F
_INETSMTPE_COMMAND_AUTH_PLAIN=0x12E
_INETSMTPE_COMMAND_DATA=0x133
_INETSMTPE_COMMAND_DATABLOCK=0x19F
_INETSMTPE_COMMAND_DIGESTMD5=0x132
_INETSMTPE_COMMAND_EHLO=0x12D
_INETSMTPE_COMMAND_EHLO_STARTTLS=0x19D
_INETSMTPE_COMMAND_MAIL_FROM=0x12C
_INETSMTPE_COMMAND_QUIT=0x134
_INETSMTPE_COMMAND_RCPT_TO=0x135
_INETSMTPE_CONNECTION_CLOSED=0x190
_INETSMTPE_CSMTP_NO_ERROR=0
_INETSMTPE_FILE_NOT_EXIST=0x194
_INETSMTPE_LACK_OF_MEMORY=0x198
_INETSMTPE_LOGIN_NOT_SUPPORTED=0x1A1
_INETSMTPE_MSG_BODY_ERROR=0x136
_INETSMTPE_MSG_TOO_BIG=0x195
_INETSMTPE_OUT_OF_MSG_RANGE=0x19C
_INETSMTPE_RECVBUF_IS_EMPTY=0x19A
_INETSMTPE_SELECT_TIMEOUT=0x193
_INETSMTPE_SENDBUF_IS_EMPTY=0x19B
_INETSMTPE_SERVER_NOT_READY=0x191
_INETSMTPE_SERVER_NOT_RESPONDING=0x192
_INETSMTPE_SSL_PROBLEM=0x19E
_INETSMTPE_STARTTLS_NOT_SUPPORTED=0x1A0
_INETSMTPE_TIME_ERROR=0x199
_INETSMTPE_UNDEF_LOGIN=0xCC
_INETSMTPE_UNDEF_MAIL_FROM=0xC9
_INETSMTPE_UNDEF_MSG_HEADER=0xC8
_INETSMTPE_UNDEF_PASSWORD=0xCD
_INETSMTPE_UNDEF_RECIPIENTS=0xCB
_INETSMTPE_UNDEF_RECIPIENT_MAIL=0xD1
_INETSMTPE_UNDEF_SUBJECT=0xCA
_INETSMTPE_UNDEF_XYZ_RESPONSE=0x197
_INETSMTPE_WSA_CONNECT=0x68
_INETSMTPE_WSA_GETHOSTBY_NAME_ADDR=0x69
_INETSMTPE_WSA_HOSTNAME=0x6B
_INETSMTPE_WSA_INVALID_SOCKET=0x6A
_INETSMTPE_WSA_IOCTLSOCKET=0x6C
_INETSMTPE_WSA_RECV=0x67
_INETSMTPE_WSA_SELECT=0x6D
_INETSMTPE_WSA_SEND=0x66
_INETSMTPE_WSA_STARTUP=0x64
_INETSMTPE_WSA_VER=0x65
_INETSMTP_SECURITY_DO_NOT_SET=3
_INETSMTP_SECURITY_NO_SECURITY=0
_INETSMTP_SECURITY_USE_SSL=2
_INETSMTP_SECURITY_USE_TLS=1
_INETSMTP_XPRIORITY_HIGH=2
_INETSMTP_XPRIORITY_LOW=4
_INETSMTP_XPRIORITY_NORMAL=3

Markdown 格式