IMessage

public interface IMessage

Represents a common message interface

Methods

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

getAttachments()

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

Gets message attachments

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

getBcc()

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

Gets BCC recipients

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

getBody()

public abstract String getBody()

Gets or sets a message body

Returns: java.lang.String

getBodyType()

public abstract int getBodyType()

Gets the type of the body.

Returns: int

getCC()

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

Gets CC recipients

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

getDate()

public abstract Date getDate()

Gets the date and time when message was delivered

Returns: java.util.Date

getFrom()

public abstract IMailAddress getFrom()

Gets or sets a from address

Returns: IMailAddress

getHtmlBody()

public abstract String getHtmlBody()

Gets or sets a html formatted message body

Returns: java.lang.String

getSubject()

public abstract String getSubject()

Gets or sets a message subject

Returns: java.lang.String

getTo()

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

Gets recipients

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

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

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

setBody(String value)

public abstract void setBody(String value)

Gets or sets a message body

Parameters:

Parameter Type Description
value java.lang.String

setFrom(IMailAddress value)

public abstract void setFrom(IMailAddress value)

Gets or sets a from address

Parameters:

Parameter Type Description
value IMailAddress

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

setSubject(String value)

public abstract void setSubject(String value)

Gets or sets a message subject

Parameters:

Parameter Type Description
value java.lang.String