Mail SMTP sender object
# new TubMailSenderBind (paramsObj: Object)
Arguments:
paramsObj
: Objecthost
: Stringmail server host
port
: Stringmail server port
user
='': Stringmail server login
password
='': Stringmail server password
tls
: Booleanuse tls on server request. OpenSSL libraries version >= 0.9.7 must be installed - see package README.md for details
fullSSL
: BooleanSetup TLS before any command to SMTP
auth
: Booleanauthentication required
deferLogin
: Booleando not call an SMTP Login method inside a constructor (MUST be called manually)
parameters object
Methods
# login () static
Login to mail server (if deferLogin === true in a constructor) throws on any error
# sendMail (mailObj: Object) → Boolean static
send a email message
Return:
True if successfully
Arguments:
mailObj
: Objectsubject
: Stringmail subject
bodyType
=UBMail.TubSendMailBodyType.Text: UBMail.TubSendMailBodyTypemail body type
body
='': Stringmail body. If bodyType is Calendar then valid *.ics file
fromAddr
='': Stringsender address
replyTo
='': Stringthe Reply-To address in email
toAddr
=[]: Array.<String>array of receivers addresses
attaches
=[]: Array.<UBMail.TubMailAttach>array of attaches. Ignored when bodyType is Calendar.
sending mail object