Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Wildcard Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Smtp Source Code
 previous   up   next 

Types
smtpConnection
Describes a SMTP connection to a remote SMTP server.
smtpMessage
Describes a SMTP message.

smtpConnection

const type: smtpConnection

Describes a SMTP connection to a remote SMTP server.


smtpMessage

const type: smtpMessage

Describes a SMTP message.


Function Summary
void
close (inout smtpConnection: smtp)
Close an SMTP connection.
smtpConnection
openSmtp (in string: hostName, in integer: smtpPort)
Open an SMTP connection to the specified host and port.
void
login (inout smtpConnection: smtp, in string: user, in string: password)
Login as user with password.
void
send (inout smtpConnection: smtp, in string: fromAddr, in array string: toAddrs, in smtpMessage: message)
Send message from fromAddr to toAddrs.
void
send (inout smtpConnection: smtp, in smtpMessage: message)
Send message to the addresses specified in the message.

Function Detail

close

const proc: close (inout smtpConnection: smtp)

Close an SMTP connection. Disconnects from the SMTP server and closes the socket.


openSmtp

const func smtpConnection: openSmtp (in string: hostName, in integer: smtpPort)

Open an SMTP connection to the specified host and port.

Parameters:
hostName - Either a host name ("e.g.: "www.example.org"), or an IPv4 address in standard dot notation (e.g.: "192.0.2.235"), or an IPv6 address in colon notation.
smtpPort - Port to be used for the SMTP connection. SMTP usually uses the ports 25, 465 and 587, but other ports can also be specified.
Returns:
an SMTP connection. For an open SMTP connection smtp.sock <> STD_NULL holds. When the connection could not be opened smtp.sock = STD_NULL holds.

login

const proc: login (inout smtpConnection: smtp, in string: user, in string: password)

Login as user with password.

Parameters:
smtp - Open smtp connection.
user - Username to be used for the login.
password - Password to be used for the login.
Raises:
FILE_ERROR - When the login fails.

send

const proc: send (inout smtpConnection: smtp, in string: fromAddr, in array string: toAddrs, in smtpMessage: message)

Send message from fromAddr to toAddrs.

Parameters:
smtp - Open smtp connection.
fromAddr - Address of the sender.
toAddrs - Addresses of the receivers.
message - Message to be sent.
Raises:
FILE_ERROR - When sending the message fails.

send

const proc: send (inout smtpConnection: smtp, in smtpMessage: message)

Send message to the addresses specified in the message.

Parameters:
smtp - Open smtp connection.
message - Message to be sent.
Raises:
FILE_ERROR - When sending the message fails.


 previous   up   next