Package org.ametys.core.util.mail
Class SendMailHelper
java.lang.Object
org.ametys.core.util.mail.SendMailHelper
- All Implemented Interfaces:
Disposable
Helper for sending mail
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Implements the builder pattern for creating and sending emails.static final record
A record representing a stream with name and mime type -
Field Summary
-
Method Summary
-
Field Details
-
EMAIL_VALIDATION_REGEXP
Regexp to validate an email- See Also:
-
EMAIL_VALIDATION
Regexp to validate an email
-
-
Method Details
-
dispose
- Specified by:
dispose
in interfaceDisposable
-
newMail
Creates a new mail builder.- Returns:
- the newly created
SendMailHelper.MailBuilder
.
-
inlineCSS
This method inline css in <style> tags directly in the appropriates tags. e.g. : <style>h1 {color: red;}</style> <h1>a</h1> becomes <h1 style="color: red">a</h1>- Parameters:
html
- The html code to inline- Returns:
- The html with CSS code inlined
-