Chapter 85. smtpclientlib
This library provides a more direct access to the sending of SMTP emails than the sendmail library, and it is used by the sendmail library. It currently only implements text-based emails. See the source code for further information.
smtpmessage
Description
Type Tags
None
Object Value
Objects of type smtpmessage have no value, and it is an error to try to get or set this value.
smtpmessage.new()
Description
Prototype
smtpmessage
.new
(
smtpmessage
,
string me
,
string contenttype
)
transferencoding
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | smtpmessage | |
contenttype | text/plain; charset="iso-8859-15" | string | |
transferencoding | 8bit | string |
Properties
Property | Type | Description |
---|---|---|
addattachment | function | |
addrecip | function | |
attachments | set | |
authtype | integer | |
bcc | set | |
body | string | |
boundary | string | |
cc | set | |
comment | string | |
contenttype | string | |
createmimeboundary | function | |
debug | boolean | |
dt | datetime | |
from | string | |
getaddress | function | |
hostname | string | |
mailhost | string | |
messageid | string | |
password | string | |
preparemsg | function | |
replyto | string | |
send | function | |
send8bit | function | |
setauthinfo | function | |
subject | string | |
timezone | string | |
to | set | |
transferencoding | string | |
type | type | |
usehtml | boolean | |
username | string |
Methods
addattachment()
Description
Prototype
smtpmessagevar
.addattachment
(
smtpmessage
,
string me
,
integer filename
)
error
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | smtpmessage | |
filename | None | string | |
error | None | integer |
addrecip()
Description
Prototype
smtpmessagevar
.addrecip
(
smtpmessage
,
string me
,
string reciptype
)
address
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | smtpmessage | |
reciptype | None | string | |
address | None | string |
createmimeboundary()
Description
Prototype
smtpmessagevar
.createmimeboundary
(
smtpmessage
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | smtpmessage |
getaddress()
Description
Prototype
smtpmessagevar
.getaddress
(
smtpmessage
,
string me
)
s
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | smtpmessage | |
s | None | string |
send()
Description
Prototype
smtpmessagevar
.send
(
smtpmessage
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | smtpmessage |
send8bit()
Description
Prototype
smtpmessagevar
.send8bit
(
smtpmessage
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | smtpmessage |
setauthinfo()
Description
Prototype
smtpmessagevar
.setauthinfo
(
smtpmessage
,
integer me
,
string authtype
,
string username
,
integer password
)
error
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | smtpmessage | |
authtype | None | integer | |
username | None | string | |
password | None | string | |
error | None | integer |