php functions for common slack integrations
Main functions:
slack()
- send a messagge to che slack channelslack_mails()
- checks emails and sends the new ones to the slack channel
- Clone the repository
- Update config.json to your slack channel's webhook, and imap server (is using slack_mails)
- Include "slack_tools.php" in your project
- Run
printf "<?php\ninclude 'slack_tools.php';\nslack_mails();" > mailbot.php
- Run
crontab -e
to start a new cronjob - Add
*/5 * * * * php -c mailbot.php
to check for mails every 5 minutes - Exit and save