SMTPclient reference


SMTPclient

Super Class

INETclient

Class Methods

new( address = 'localhost', port = 25 )

This method create new SMTPclient object.

Methods

login( helo_domain = ENV['HOSTNAME'] )

This method opens TCP connection and start SMTP session.
If client had logged in, do nothing and return false.

sendmail( mailsrc, from_domain, to_addrs )

This method sends 'mailsrc' as mail. SMTPclient read strings from 'mailsrc' by calling 'each' iterator, and convert them into "\r\n" terminated string when write.

Calling this method before logging in raises INETprotocol::ProtoCommandError. Ant other SMTPclient's Exception is:

logout

This method closes SMTP session. If client did't logged in, do nothind and return false.


Copyright (c) 1998-2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>