Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 

37 Zeilen
1.2 KiB

  1. package com.ffii.fpsms.modules.common
  2. import com.ffii.fpsms.modules.settings.service.SettingsService
  3. import org.apache.commons.lang3.StringUtils
  4. open class MailSMTP(settingsService: SettingsService) {
  5. open var host: String? = null
  6. open var port: Int? = null
  7. open var username: String? = null
  8. open var password: String? = null
  9. open var auth: Boolean? = null
  10. init {
  11. this.host = settingsService.getString(SettingNames.MAIL_SMTP_HOST)
  12. this.port = settingsService.getInt(SettingNames.MAIL_SMTP_PORT)
  13. this.username = settingsService.getString(SettingNames.MAIL_SMTP_USERNAME)
  14. this.password = settingsService.getString(SettingNames.MAIL_SMTP_PASSWORD)
  15. this.auth = settingsService.getBoolean(SettingNames.MAIL_SMTP_AUTH)
  16. }
  17. final override fun equals(other: Any?): Boolean {
  18. if (other == null || other !is MailSMTP) return false
  19. val o = other as MailSMTP
  20. if (StringUtils.equals(this.host, o.host) &&
  21. this.port == o.port &&
  22. StringUtils.equals(this.username, o.username) &&
  23. StringUtils.equals(this.password, o.password) &&
  24. this.auth == o.auth
  25. ) {
  26. return true
  27. }
  28. return false
  29. }
  30. }