# Uses of Class
com.logicaldoc.core.communication.EMail

Packages that use EMail
Package
Description
com.logicaldoc.core.automation
Automation subsystem that allows you to program your own logic inside the platform.
The automation engine can be accessed through the class `Automation`
Please note the special annotation `AutomationDictionary` that is used to automatically put in the Dictionary whatever bean you need.
com.logicaldoc.core.communication
Classes that model emails and messages and the machinery to work with them.

## Uses of EMail in com.logicaldoc.core.automation

Methods in com.logicaldoc.core.automation that return EMail
Modifier and Type
Method
Description
`EMail`
MailTool.`documentToEMail(Document document, boolean extractAttachments)`
Creates an `EMail` object given the document that stores an email message.

## Uses of EMail in com.logicaldoc.core.communication

Methods in com.logicaldoc.core.communication that return EMail
Modifier and Type
Method
Description
`static EMail`
MailUtil.`messageToMail(jakarta.mail.Message msg, boolean extractAttachmentContent)`
Builds an EMail from a Message.
`static EMail`
MailUtil.`messageToMail(File emlFile, boolean extractAttachmentContent)`
Builds an EMail from a .eml file.
`static EMail`
MailUtil.`messageToMail(InputStream is, boolean extractAttachmentContent)`
Builds an EMail from a stream
`static EMail`
MailUtil.`msgToMail(File msgFile, boolean extractAttachmentContent)`
Builds an EMail from a .msg file.
`static EMail`
MailUtil.`msgToMail(InputStream is, boolean extractAttachmentContent)`
Builds an EMail from a .msg file
Methods in com.logicaldoc.core.communication with parameters of type EMail
Modifier and Type
Method
Description
`void`
EMailSender.`send(EMail email)`
This method sends an email using the smtp-protocol.
`void`
EMailSender.`send(EMail email, String templateName, Map<String,Object> dictionary)`
Sends an email by using a given template
`void`
EMailSender.`sendAsync(EMail email)`
Same as send(EMail) but executes in another thread
`void`
EMailSender.`sendAsync(EMail email, String templateName, Map<String,Object> dictionary)`
Same as send(EMail, String, Map) but executes in another thread