Skip to content

SetHeader

Sets a custom header for the message.

1
myMessage.SetHeader(name: string, value: string):Message

Parameters

string name
    The name of the header.

string value
    The value of the header.

Returns

The current message instance.

Examples

Add a correlation header

1
2
3
var msg = $Messages.New('[email protected]', 'Request received', 'Thank you for your request.');
msg.SetHeader('X-Request-Number', String($Instance.Number));
msg.Send();

See Also