No Description

Sergey Musatov df34b40f03 fix composer.json 3 years ago
src 0a89c0d8a8 add request for email/send 3 years ago
.gitignore 930af8013f add gitignore 3 years ago
README.md 5826f1b934 fix README.md 3 years ago
composer.json df34b40f03 fix composer.json 3 years ago

README.md

API UniOne

API for https://unione.io/ (https://unione.ru/)

Example send email

$client = new SMusatov\UniOne\Client('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', Client::SERVER_EU);

$emailSend = (new SMusatov\UniOne\Request\EmailSend())
    ->addRecipient('user@example.com')
    ->setSubject('Test')
    ->setBodyPlainText('Hello from textplain')
    ->setFrom('noreply@domain-from.com', 'Domain From')
    ->setTrackRead(true)
    ->addAttachment('filename.txt', base64_encode(file_get_contents('filename.txt')));

$response = $client->sendRequest($emailSend);

print_r($response)
Array
(
    [status] => success
    [job_id] => 1mXObN-0003EB-HQAp
    [emails] => Array
        (
            [0] => user@example.com
        )

    [http_code] => 200
)