EN · DE · RU · FR · ES

#1395: SendMail.kt

projectforge-business/src/main/kotlin/org/projectforge/mail/SendMail.kt Type: Kotlin Class · Package: org.projectforge.mail · Source: projectforge-business/src/main/kotlin/org/projectforge/mail/SendMail.kt 459 lines · 342 code · 78 comments · 39 blank
Kotlin Class implementing for.

Annotations

@Service

Properties

PropertyDeclaration
configurationServiceConfigurationService
domainServiceDomainService
mailingEnabledString? = null
mailFromStandardEmailSenderString? = null
mailSmtpEncryptionProtocolString? = null
mailLocalHostString? = null
mailSmtpHostString? = null
mailSmtpPortString? = null
mailSmtpAuthfalse
mailSmtpUserString? = null
mailSmtpPasswordString? = null
randomRandom()
tocomposedMessage.to
isConfiguredBoolean
sessionSession?
propertiesProperties()
sessionsession
messageMimeMessage(session)
subjectcomposedMessage.subject
mpcreateMailAttachmentContent(message, composedMessage, icalContent, attachments, CHARSET)

Functions

FunctionParametersReturn
fromStringtype: String?Protocol
postConstructUnit
sendcomposedMessage: Mail?, attachments: Collection<IMailAttachment>?Boolean
sendcomposedMessage: Mail?, icalContent: String? = null, attachments: Collection<IMailAttachment>? = null, async: Boolean = trueBoolean
sendItcomposedMessage: Mail, icalContent: String?, attachments: Collection<IMailAttachment>?Unit
createMailAttachmentContentmessage: MimeMessage, composedMessage: Mail, icalContent: String?, attachments: Collection<IMailAttachment>?, charset: StringMimeMultipart
renderGroovyTemplatecomposedMessage: Mail, groovyTemplate: String, data: MutableMap<String, Any?>, title: String, recipient: PFUserDO?String
renderKotlinTemplatecomposedMessage: Mail, kotlinTemplate: String, data: MutableMap<String, Any?>, title: String, recipient: PFUserDOString
preparecomposedMessage: Mail, data: MutableMap<String, Any?>, title: String, recipient: PFUserDO?Unit
buildUrlsubPath: String?String
getProjectForgeSubjectsubject: StringString
formatUserWithMailname: String, mail: String?String
internalSetTestModeUnit

Architecture Analysis

Resides in projectforge-business, the core module containing domain logic, services, and persistence. Marked with @Configuration, providing Spring bean definitions and wiring for a specific subsystem.

Git History

CommitWhat changed
868d6abb752025 -> 2026
b309e9be9cMailAttachments improved (effected BirthdayButler, Polls). E-Mail is sent automatically, if nightly sanity check has errors.
63081666f6Source file headers: 2024-> 2025.
b405cf643cWIP
67805f2fc1ThreadLocalUserContext.user -> ThreadLocalUserContext.loggedInUser (renamed for avoiding mis-understandings in code).
77bade6dfbjavax.* -> jakarta.*
b6092df092Copyright 2023 -> 2024
a25c868cbcSendMail refactored (Genome part removed).
ab45d51fa4Copyright 2001-2022 -> 2001-2023.
73b0be50b2org.apache.commons.collections -> org.apache.commons.collections4
38bec971afThreadLocal -> Kotlin
eec2608215I18nHelper.getLocalizedMessage(user, ...) implemented for getting translation for given user (used e. g. by mail notifications for determing the user's locale as best as possible).
24a051884eSendMail -> Kotlin (fixes)
71754f1061SendMail: data map allows null values.
9b10171715Test fixed.
bc6e7c72d4SendMail -> Kotlin
e428c924d4SendMail Kotlin -> Groovy (due to problems with Powermock).
c1d6f116a7Source file headers fixed.
5955e0edd2Logo bug fixed.
0fb0c21b81WIP: mail service. Logo stuff handled now by ConfigurationService (not yet finished).
c5e6d921b5GroovyEngine and SendMail -> Kotlin.