Package com.logicaldoc.core.communication

# Class EMail

java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.communication.Message
com.logicaldoc.core.communication.EMail

All Implemented Interfaces:
  `Serializable`

public class EMail extends Message
A represetnation of an Email message.

Author:
  Michael Scholz, Marco Meschieri - LogicalDOC
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class com.logicaldoc.core.communication.Message

`TYPE_NOTIFICATION, TYPE_SYSTEM`

### Fields inherited from class com.logicaldoc.core.PersistentObject

`DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id`

## Constructor Summary

Constructors
Constructor
Description
`EMail()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addAttachment(int partId, EMailAttachment attachment)`
`void`
`addAttachment(EMailAttachment attachment)`
`void`
`addRecipient(Recipient rec)`
`boolean`
`equals(Object obj)`
`long`
`getAccountId()`
`Set<jakarta.mail.internet.InternetAddress>`
`getAddresses()`
`Set<jakarta.mail.internet.InternetAddress>`
`getAddressesBCC()`
`Set<jakarta.mail.internet.InternetAddress>`
`getAddressesCC()`
`Set<String>`
`getAllRecipientsEmails()`
Retrieves the set of all the recipients of the message, does not matter if they are direct recipient or CC or BCC
`EMailAttachment`
`getAttachment(int partId)`
`Map<Integer,EMailAttachment>`
`getAttachments()`
`int`
`getAttachmentsCount()`
`String`
`getAuthorAddress()`
`String`
`getEmailId()`
`String`
`getFolder()`
`Recipient`
`getFrom()`
`Map<String,String>`
`getHeaders()`
`Set<String>`
`getImages()`
`Set<Recipient>`
`getRecipientsBCC()`
`Set<Recipient>`
`getRecipientsCC()`
`Set<Recipient>`
`getReplyTo()`
`int`
`getSigned()`
`Folder`
`getTargetFolder()`
`String`
`getUsername()`
`int`
`hashCode()`
`boolean`
`isHistoricyze()`
`boolean`
`isSigned()`
`boolean`
`isSkip()`
`void`
`parseRecipients(String str)`
`void`
`parseRecipientsBCC(String str)`
`void`
`parseRecipientsCC(String str)`
`void`
`parseReplyTo(String str)`
`void`
`setAccountId(long accountId)`
`void`
`setAttachments(Map<Integer,EMailAttachment> attachments)`
`void`
`setAttachmentsCount(int attachmentCount)`
`void`
`setAuthorAddress(String address)`
`void`
`setEmailId(String emailId)`
`void`
`setFolder(String string)`
`void`
`setFrom(Recipient from)`
`void`
`setHeaders(Map<String,String> headers)`
`void`
`setHistoricyze(boolean historicyze)`
`void`
`setImages(Set<String> images)`
`void`
`setRecipientsBCC(Set<Recipient> recipientsBCC)`
`void`
`setRecipientsCC(Set<Recipient> recipientsCC)`
`void`
`setReplyTo(Set<Recipient> replyTo)`
`void`
`setSigned(int signed)`
`void`
`setSkip(boolean skip)`
`void`
`setTargetFolder(Folder targetFolder)`
`void`
`setUsername(String username)`

### Methods inherited from class com.logicaldoc.core.communication.Message

`getAuthor, getLocale, getMessageText, getReceivedDate, getRecipient, getRecipients, getSentDate, getSubject, getType, isHtml, isNotify, setAuthor, setHtml, setLocale, setMessageText, setNotify, setReceivedDate, setRecipients, setSentDate, setSubject, setType, wasReadBy`

### Methods inherited from class com.logicaldoc.core.PersistentObject

`getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### EMail

public EMail()

## Method Details

### getEmailId

public String getEmailId()

### setEmailId

public void setEmailId(String emailId)

### getAccountId

public long getAccountId()

### setAccountId

public void setAccountId(long accountId)

### getAuthorAddress

public String getAuthorAddress()

### getUsername

public String getUsername()

### setAuthorAddress

public void setAuthorAddress(String address)

### setUsername

public void setUsername(String username)

### addRecipient

public void addRecipient(Recipient rec)

### getFolder

public String getFolder()

### setFolder

public void setFolder(String string)

### getAttachments

public Map<Integer,EMailAttachment> getAttachments()

### getAttachment

public EMailAttachment getAttachment(int partId)

### addAttachment

public void addAttachment(int partId, EMailAttachment attachment)

### addAttachment

public void addAttachment(EMailAttachment attachment)

### getAddresses

public Set<jakarta.mail.internet.InternetAddress> getAddresses()

### getAddressesCC

public Set<jakarta.mail.internet.InternetAddress> getAddressesCC()

### getAddressesBCC

public Set<jakarta.mail.internet.InternetAddress> getAddressesBCC()

### getAttachmentsCount

public int getAttachmentsCount()

### setAttachments

public void setAttachments(Map<Integer,EMailAttachment> attachments)

### parseRecipients

public void parseRecipients(String str)

### parseRecipientsCC

public void parseRecipientsCC(String str)

### parseRecipientsBCC

public void parseRecipientsBCC(String str)

### parseReplyTo

public void parseReplyTo(String str)

### getRecipientsCC

public Set<Recipient> getRecipientsCC()

### setRecipientsCC

public void setRecipientsCC(Set<Recipient> recipientsCC)

### getRecipientsBCC

public Set<Recipient> getRecipientsBCC()

### setRecipientsBCC

public void setRecipientsBCC(Set<Recipient> recipientsBCC)

### getReplyTo

public Set<Recipient> getReplyTo()

### setReplyTo

public void setReplyTo(Set<Recipient> replyTo)

### getImages

public Set<String> getImages()

### setImages

public void setImages(Set<String> images)

### setAttachmentsCount

public void setAttachmentsCount(int attachmentCount)

### getFrom

public Recipient getFrom()

### setFrom

public void setFrom(Recipient from)

### isSigned

public boolean isSigned()

### getSigned

public int getSigned()

### setSigned

public void setSigned(int signed)

### isSkip

public boolean isSkip()

### setSkip

public void setSkip(boolean skip)

### getTargetFolder

public Folder getTargetFolder()

### setTargetFolder

public void setTargetFolder(Folder targetFolder)

### getAllRecipientsEmails

public Set<String> getAllRecipientsEmails()
Retrieves the set of all the recipients of the message, does not matter if they are direct recipient or CC or BCC

Returns:
  the email addresses that will receive the message

### isHistoricyze

public boolean isHistoricyze()

### setHistoricyze

public void setHistoricyze(boolean historicyze)

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Message`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Message`

### getHeaders

public Map<String,String> getHeaders()

### setHeaders

public void setHeaders(Map<String,String> headers)