diff options
Diffstat (limited to 'module/pop3.m')
| -rw-r--r-- | module/pop3.m | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/module/pop3.m b/module/pop3.m new file mode 100644 index 00000000..a0066550 --- /dev/null +++ b/module/pop3.m @@ -0,0 +1,40 @@ +# pop3 protocol independent access to an email server. + +Pop3: module +{ + PATH: con "/dis/lib/pop3.dis"; + + # all functions return status (-ve when error) + + # open a connection with the pop3 server + # requires the email server's name or address or nil if a default server is to be used + # returns (status, errror string) + open: fn(user, password, server: string) : (int, string); + + # stat the user's mailbox + # returns (status, error string, no. messages, total no. bytes) + stat: fn(): (int, string, int, int); + + # list the user's mailbox + # returns (status, error string, list of (message no., bytes in message)) + msglist: fn(): (int, string, list of (int, int)); + + # list as above but return (status, error string, list of message nos.) + msgnolist: fn(): (int, string, list of int); + + # top of a message given it's no. + # returns (status, error string, message top) + top: fn(m: int) : (int, string, string); + + # full text of a message given it's no. + # returns (status, error string, message) + get: fn(m: int) : (int, string, string); + + # delete a message given it's no. + # returns (status, error string) + delete: fn(m: int) : (int, string); + + # close the connection + # returns (status, error string) + close: fn(): (int, string); +}; |
