https://github.com/mailru/mrasender
Tarantool module for sending messages to Mail.Ru Agent
https://github.com/mailru/mrasender
Last synced: 4 months ago
JSON representation
Tarantool module for sending messages to Mail.Ru Agent
- Host: GitHub
- URL: https://github.com/mailru/mrasender
- Owner: mailru
- License: other
- Created: 2016-04-27T08:54:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-11-09T09:47:03.000Z (almost 4 years ago)
- Last Synced: 2024-12-31T19:45:55.667Z (9 months ago)
- Language: C
- Size: 25.4 KB
- Stars: 3
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mrasender - [Tarantool][] module for sending messages to Mail.Ru Agent
Warning: recipient must be in your contactlist!
## Prerequisites
* Tarantool 1.6.5+ with header files (tarantool && tarantool-dev packages)
## Installation HowTo
* Install [Tarantool] && tarantool-dev packages (see http://tarantool.org/download.html)
* Install mrasender module for [Tarantool]
```
git clone https://github.com/agent-0007/mrasender
cd mrasender
cmake .
make
make install
```* Copy paste LUA script below, save it to file mrasender_test.lua
```lua#!/usr/bin/env tarantool
box.cfg{
log_level = 5
}local agent = require('mrasender')
local log = require('log')local username = 'USERNAME@mail.ru'
local password = 'PASSWORD'
local recipient = 'RECIPIENT@mail.ru'
local msg = 'Test message from tarantool'-- send message to recipient from username
local res = agent.send_message_to_mra(username, password, recipient, msg)log.info("Send message to:"..recipient..", result:"..res);
```
* Replace USERNAME@mail.ru, PASSWORD, RECIPIENT@mail.ru whith your sending account and recipient account
* chmod +x mrasender_test.lua
* Run and enjoy: ./mrasender.lua## See Also
* [Tarantool][]
* [Tarantool Rocks][TarantoolRocks]
* [Tarantool/Lua API Reference][TarantoolLuaReference]
* [Tarantool/C API Reference][TarantoolCReference]
* [Lua/C API Reference][LuaCReference][Tarantool]: http://github.com/tarantool/tarantool
[Download]: http://tarantool.org/download.html
[RockSpec]: https://github.com/keplerproject/luarocks/wiki/Rockspec-format
[LuaCReference]: http://pgl.yoyo.org/luai/i/_
[TarantoolLuaReference]: http://tarantool.org/doc/reference/index.html
[TarantoolCReference]: http://tarantool.org/doc/reference/capi.html
[TarantoolRocks]: https://github.com/tarantool/rocks