Skip to content
nedimf edited this page Aug 12, 2019 · 1 revision

Documentation


Documentation for version v.0.0.1

  • smtp

Constructor that is used to declare SMTP server your will use (String)

  • smtpUsername

Constructor that is used to declare SMTP username of your server (String)

  • smtpPassword

Constructor that is used to declare SMTP password of your server (String)

  • smtpAuthentication

Constructor that is used to declare if your server needs authentication (Boolean)

  • port

Constructor that is used to declare port of your server (String)

  • type

Constructor that is used to declare type of your content (MaildroidXType)

  • MaildroidXType.HTML
  • MaildroidXType.PLAIN
  • to

Constructor that is used to declare internet adress where email will be send (String)

  • from

Constructor that is used to declare internet adress witch email is sent from. It s fully supporting @no_replay or not existent email adresses (String)

  • subject

Constructor that is used to declare subject of email your sending (String)

  • body

Constructor that is used to declare body of email your sending (String)

  • attachment

Constructor that is used to declare attachment of email in case that ones need to be added. (String)

  • Attachment in version 0.0.1 is single supported in next version more attachments will be supported and they will be type of an ArrayString
  • onCompleteCallback ()

When sending email is done, call this constructor to handle further actions in your app. Constructor is made out of two functions

  • onSuccess() that handles when email is succssfully sent
  • onFail() that handles any error in sending email
  • timeout value that is used to predict timout how long will it take for email to be sent defualt is 3 seconds (Long)
  • mail ()

Function that is called when email is ready to be sent

Errors


Maildroid is handling small amount of exceptions.

IllegalArgumentException
These exceptions are called after an error in checking if mandatory fields are not existent.

  • MaildroidX detected that you didn't pass [smtp] value in to the builder!
  • MaildroidX detected that you didn't pass [smtpAuthentication] value to the builder!
  • MaildroidX detected that you didn't pass [port] value to the builder!

AuthenticationFailedException
These exceptions are called when username or password on SMTP server is not correct, or address of SMTP server is not existent.

  • MaildroidX detected that you didn't pass [smtpUsername] or [smtpPassword] to the builder!
  • MaildroidX detected that you didn't pass [smtpUsername] or [smtpPassword] to the builder!

Other

  • SMTPAddressFailedException

Thrown when mail can't be sent

  • MessagingException

Thrown when there is problem with message

  • IOException

File in attachment not found or not existent

Clone this wiki locally