mirror of
https://github.com/tursom/TursomServer.git
synced 2025-03-13 11:20:10 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
370fb3d0f4
@ -6,7 +6,7 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
implementation(project(":"))
|
||||
implementation(group = "com.sun.mail", name = "javax.mail", version = "1.6.2")
|
||||
api(group = "com.sun.mail", name = "javax.mail", version = "1.6.2")
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,9 +14,10 @@ import javax.mail.internet.InternetAddress
|
||||
data class GroupEmailData(
|
||||
var host: String?, var port: Int?, var name: String?, var password: String?, var from: String?,
|
||||
var to: Collection<String>?, var subject: String?, var html: String? = null, var text: String? = null,
|
||||
var image: Collection<Image>? = null, var attachment: Collection<DataSource>? = null
|
||||
var image: Collection<Image>? = null, var attachment: Collection<DataSource>? = null,
|
||||
) {
|
||||
fun send(transportListener: TransportListener? = null) {
|
||||
fun send() = send(null)
|
||||
fun send(transportListener: TransportListener?) {
|
||||
if (host == null || port == null || name == null || password == null || from == null || to?.isEmpty() != false || subject == null) return
|
||||
val props = Properties()
|
||||
// props["mail.debug"] = "true" // 开启debug调试
|
||||
|
Loading…
Reference in New Issue
Block a user