TubMailSenderBind

@unitybase/mailer~ TubMailSenderBind

Mail SMTP sender object

Constructor

new TubMailSenderBind(paramsObj)

Arguments:
  1. paramsObj (Object)  parameters object
    Properties
    1. host (String)  host of mail server
    2. port (String)  port of mail server
    3. [user=''] (String)  user login on mail server
    4. [password=''] (String)  user password on mail server
    5. [tls=false] (Boolean)  use tls. In UBMail tls is not implemented so you will get an exception when set this value true. For using tls use UBMail_openssl class
    6. [auth=false] (Boolean)  is need user authentication

Methods

sendMail(mailObj)Boolean static

send a email message
Arguments:
  1. mailObj (Object)  sending mail object
    Properties
    1. [subject] (String)  mail subject
    2. [bodyType=UBMail.TubSendMailBodyType.Text] (UBMail.TubSendMailBodyType)  mail body type
    3. [body=''] (String)  mail body. If bodyType is Calendar then valid *.ics file
    4. [fromAddr=''] (String)  sender address
    5. [toAddr=[]] (Array.<String>)  array of receivers addresses
    6. [attaches=[]] (Array.<UBMail.TubMailAttach>)  array of attaches. Ignoreg when bodyType is Calendar.