IMessage

public interface IMessage

Represents a common message interface

Methods

Method Description
getSubject() Gets or sets a message subject
setSubject(String value) Gets or sets a message subject
getBody() Gets or sets a message body
setBody(String value) Gets or sets a message body
getHtmlBody() Gets or sets a html formatted message body
setHtmlBody(String value) Gets or sets a html formatted message body
getDate() Gets the date and time when message was delivered
getAttachments() Gets message attachments
getTo() Gets recipients
getCC() Gets CC recipients
getBcc() Gets BCC recipients
getFrom() Gets or sets a from address
setFrom(IMailAddress value) Gets or sets a from address
getBodyType() Gets the type of the body.
save(String fileName) Saves message to the specified file
save(OutputStream stream) Saves message to the specified stream

getSubject()

public abstract String getSubject()

Gets or sets a message subject

Returns: java.lang.String

setSubject(String value)

public abstract void setSubject(String value)

Gets or sets a message subject

Parameters:

Parameter Type Description
value java.lang.String

getBody()

public abstract String getBody()

Gets or sets a message body

Returns: java.lang.String

setBody(String value)

public abstract void setBody(String value)

Gets or sets a message body

Parameters:

Parameter Type Description
value java.lang.String

getHtmlBody()

public abstract String getHtmlBody()

Gets or sets a html formatted message body

Returns: java.lang.String

setHtmlBody(String value)

public abstract void setHtmlBody(String value)

Gets or sets a html formatted message body

Parameters:

Parameter Type Description
value java.lang.String

getDate()

public abstract Date getDate()

Gets the date and time when message was delivered

Returns: java.util.Date

getAttachments()

public abstract System.Collections.Generic.IGenericCollection<Attachment> getAttachments()

Gets message attachments

Returns: com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.email.Attachment>

getTo()

public abstract System.Collections.Generic.IGenericCollection<MailAddress> getTo()

Gets recipients

Returns: com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.email.MailAddress>

getCC()

public abstract System.Collections.Generic.IGenericCollection<MailAddress> getCC()

Gets CC recipients

Returns: com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.email.MailAddress>

getBcc()

public abstract System.Collections.Generic.IGenericCollection<MailAddress> getBcc()

Gets BCC recipients

Returns: com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.email.MailAddress>

getFrom()

public abstract IMailAddress getFrom()

Gets or sets a from address

Returns: IMailAddress

setFrom(IMailAddress value)

public abstract void setFrom(IMailAddress value)

Gets or sets a from address

Parameters:

Parameter Type Description
value IMailAddress

getBodyType()

public abstract int getBodyType()

Gets the type of the body.

Returns: int

save(String fileName)

public abstract void save(String fileName)

Saves message to the specified file

Parameters:

Parameter Type Description
fileName java.lang.String A file name

save(OutputStream stream)

public abstract void save(OutputStream stream)

Saves message to the specified stream

Parameters:

Parameter Type Description
stream java.io.OutputStream A stream to save to