Newsman API Page
Newsman API » Newsman API 1.0 » Message » message.send_raw
Newsman Api Method: message.send_raw
Prototype: message.send_raw($key, $account_id, $mime_message, $recipients)
Description: Sends a mime message over https API
Return: struct (Returns a list with entries of dict (email, status, reason, send_id) for each recipient)
Variable | Type | Description |
---|---|---|
$key | string | API key |
$account_id | string | |
$mime_message | struct | the mime encoded message |
$recipients | struct | json list with recipients of the message – max 25000 |
Curl Code Example
curl -H "Content-Type: application/json" -X POST -d @test_call.json https://cluster.newsmanapp.com/api/1.0/message.send_raw { "key": "your_api_key", "account_id": "your_account_id", "mime_message": "Date: Thu, 13 Sep 2018 10:39:49 +0300\r\nFrom: Acme Company <acme@example.com>\r\nReply-To: Acme Company <acme@example.com>\r\nOrganization: Acme Company\r\nMessage-ID: <1547610873.20180913103949@example.com>\r\nTo: recipient@example.com\r\nSubject: hi there - test message\r\nMIME-Version: 1.0\r\nContent-Type: multipart\/alternative;\r\n boundary=\"----------0BD00325510B473B0\"\r\n\r\n------------0BD00325510B473B0\r\nContent-Type: text\/plain; charset=iso-8859-15\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\nThis is an amazing test.\r\n\r\n--=20\r\nAcme Company\r\nhttps:\/\/www.example.com\r\n------------0BD00325510B473B0\r\nContent-Type: text\/html; charset=iso-8859-15\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n<html><head><title>hi there - test message<\/title>\r\n<\/head>\r\n<body>\r\n<span style=3D\" font-family:'courier new'; font-size: 9pt;\"><b>This<\/b>&nbs=\r\np;is an amazing test.<br>\r\n<br>\r\n<span style=3D\" font-family:'arial'; color: #c0c0c0;\"><i>--<br>\r\nAcme Company\r\n<\/i><\/span><\/span><a style=3D\" font-family:'arial'; font-size: 9pt;\" href=\r\n=3D\"http:\/\/www.newsman.ro\">https:\/\/www.example.com<\/a><br>\r\n<a style=3D\" font-family:'arial'; font-size: 9pt;\" href=3D\"http:\/\/www.examp=\r\nle.com\">https:\/\/www.example.com<\/a><\/body><\/html>\r\n------------0BD00325510B473B0--", "recipients": ['recipient-1@example.com', 'recipient-2@example.com'] }