Uses of Class
org.miaixz.bus.extra.mail.MailAccount
Packages that use MailAccount
Package
Description
Provides a wrapper for email operations, based on the Jakarta Mail library.
-
Uses of MailAccount in org.miaixz.bus.extra.mail
Methods in org.miaixz.bus.extra.mail that return MailAccountModifier and TypeMethodDescriptionMailAccount.defaultIfEmpty()Fills in default values for any fields that are null or blank.GlobalMailAccount.getAccount()Retrieves the globally configured mail account.MailAccount.setAuth(boolean isAuth) Sets whether authentication is required.MailAccount.setAuthMechanisms(String authMechanisms) Sets the authentication mechanisms.MailAccount.setCharset(Charset charset) Sets the character set for encoding.MailAccount.setConnectionTimeout(long connectionTimeout) Sets the socket connection timeout.MailAccount.setCustomProperty(String key, Object value) Sets a custom property.MailAccount.setDebug(boolean debug) Sets whether to enable debug mode.MailAccount.setEncodefilename(boolean encodefilename) Sets whether to encode attachment filenames using the specified charset.Sets the sender's email address, which can be in the format "user@example.com" or "Sender Name <user@example.com>".Sets the SMTP server host.MailAccount.setPass(char[] pass) Sets the password for authentication.Sets the SMTP server port.MailAccount.setSocketFactoryClass(String socketFactoryClass) Sets the socket factory class name.MailAccount.setSocketFactoryFallback(boolean socketFactoryFallback) Sets whether to enable socket factory fallback.MailAccount.setSocketFactoryPort(int socketFactoryPort) Sets the socket factory port.MailAccount.setSslEnable(Boolean sslEnable) Sets whether to enable SSL.MailAccount.setSslProtocols(String sslProtocols) Sets the SSL protocols to be used for the connection, separated by spaces.MailAccount.setStarttlsEnable(boolean startttlsEnable) Sets whether to enable STARTTLS.MailAccount.setTimeout(long timeout) Sets the SMTP timeout.Sets the username for authentication.MailAccount.setWriteTimeout(long writeTimeout) Sets the socket write timeout.Methods in org.miaixz.bus.extra.mail with parameters of type MailAccountModifier and TypeMethodDescriptionstatic jakarta.mail.SessionMailKit.getSession(MailAccount mailAccount, boolean isSingleton) Retrieves a mailSessionbased on the provided mail account configuration.static MailMail.of(MailAccount mailAccount) Creates a newMailinstance with the specified mail account.static SMTPMessageSMTPMessage.of(MailAccount mailAccount, boolean useGlobalSession, PrintStream debugOutput) Creates a newSMTPMessageinstance.static StringMailKit.send(MailAccount mailAccount, String to, String subject, String content, boolean isHtml, File... files) Sends an email to one or more recipients using a specified mail account.static StringMailKit.send(MailAccount mailAccount, String to, String subject, String content, Map<String, InputStream> imageMap, boolean isHtml, File... files) Sends an email with embedded images to one or more recipients using a specified mail account.static StringMailKit.send(MailAccount mailAccount, Collection<String> tos, String subject, String content, boolean isHtml, File... files) Sends an email to a collection of recipients using a specified mail account.static StringMailKit.send(MailAccount mailAccount, Collection<String> tos, String subject, String content, Map<String, InputStream> imageMap, boolean isHtml, File... files) Sends an email with embedded images to a collection of recipients using a specified mail account.static StringMailKit.send(MailAccount mailAccount, Collection<String> tos, Collection<String> ccs, Collection<String> bccs, String subject, String content, boolean isHtml, File... files) Sends an email to multiple recipients, including CC and BCC, using a specified mail account.static StringMailKit.send(MailAccount mailAccount, Collection<String> tos, Collection<String> ccs, Collection<String> bccs, String subject, String content, Map<String, InputStream> imageMap, boolean isHtml, File... files) Sends an email with embedded images to multiple recipients, including CC and BCC, using a specified mail account.Constructors in org.miaixz.bus.extra.mail with parameters of type MailAccountModifierConstructorDescriptionMail(MailAccount mailAccount) Constructs a newMailinstance with the specified mail account.MailAuthenticator(MailAccount mailAccount) Constructs a newMailAuthenticatorfrom aMailAccountobject.SMTPMessage(MailAccount mailAccount, jakarta.mail.Session session) Constructs a newSMTPMessagewith the specified mail account and session.