Class SpmMessage
Represent a message in the eMarketeer module. You can create or modify such objects, which later is used by the SpmShipment class to send such messages.
Constructors
SpmMessage()
Initializes a new instance of the SpmMessage class.
Declaration
SpmMessage Methods
save()
Saves an SpmMessage object. If this is a new SpmMessage object (no ID set), a new one will be created.
Declaration
Integer save() Returns
| Type | Description |
| Integer | The ID of the SpmMessage object. |
setBody(String)
Sets the body version of the SpmMessage object (will correspond to the text/plain version in the outgoing email).
Declaration
Void setBody(String body) Parameters
| Type | Name | Description |
| String | body | The plain text version of the body. |
Returns
| Type | Description |
| Void |
setBodyHtml(String)
Sets the HTML body version of the SpmMessage object (will correspond to the text/html version in the outgoing email).
Declaration
Void setBodyHtml(String htmlBody) Parameters
| Type | Name | Description |
| String | htmlBody | The HTML version of the body. |
Returns
| Type | Description |
| Void |
setDescription(String)
Sets the descriptive text of the SpmMessage.
Declaration
Void setDescription(String description) Parameters
| Type | Name | Description |
| String | description | A text which describes this message. |
Returns
| Type | Description |
| Void |
setFolderId(Integer)
Sets the folder which this SpmMessage will be stored in.
Declaration
Void setFolderId(Integer folderId) Parameters
| Type | Name | Description |
| Integer | folderId | The ID of the folder this message will be stored in. A value of -1 indicates that it should be stored in the root folder. |
Returns
| Type | Description |
| Void |
setHeader(String)
If you need to include additional email headers, they should be added here. You have to format these yourself.
Declaration
Void setHeader(String header) Examples
Header1: Value1
Header2: Value2
Parameters
| Type | Name | Description |
| String | header | The the information. |
Returns
| Type | Description |
| Void |