Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can either send row messages without styling or you make use of the slack attachment options. The module does the hard work for you and all attachment options from slack are supported.

To add attachments, you need to add some values to your message. See here an example for a message:

Code Block
// define attachment message
$message = "%color%: #36a64f
%pretext% Optional text that appears above the attachment block
%text% Lorem Ipsum la lorem
%author_name% Bobby Tables
%title% Slack API Documentation

// send the message:
slackforwhmcs_putMessageIntoQueue ($message, '#whmcs@Custom Notification')


It is even possible to add "fields" into the attachment.
For adding fields, you use the following code:

Code Block
%FIELD1_NAME% Priority
%FIELD2_NAME% Customer
%FIELD2_VAL% Hello World