|
250 | 250 |
|
251 | 251 | > [!NOTE] |
252 | 252 | > |
253 | | -> This format extends V3 by adding support for image content. A content type indicator determines which content types are present. |
| 253 | +> This format extends V3 by adding support for image content. |
254 | 254 | > |
255 | 255 | > **All 2-byte length fields are encoded as unsigned little-endian.** |
256 | 256 |
|
257 | | -#### Content Type Indicator |
258 | | - |
259 | | -The content type indicator is a single byte with the following values: |
260 | | - |
261 | | -- **0**: Text-only content |
262 | | -- **1**: Image-only content |
263 | | -- **2**: Text and image content |
264 | | - |
265 | 257 | 1. **Email format**: Binary-encoded fields with the following structure: |
266 | 258 |
|
267 | | - - **1 byte**: Content type indicator |
268 | | - - **1 byte**: Length of `from` field (if text content present). |
269 | | - - **2 bytes**: Length of `to` field (if text content present). |
270 | | - - **2 bytes**: Length of `cc` field (if text content present). |
271 | | - - **2 bytes**: Length of `bcc` field (if text content present). |
272 | | - - **1 byte**: Length of `subject` field (if text content present). |
273 | | - - **2 bytes**: Length of `body` field (if text content present). |
274 | | - - **2 bytes**: Length of `access_token` field (if text content present and optional). |
275 | | - - **2 bytes**: Length of `refresh_token` field (if text content present and optional). |
276 | | - - **2 bytes**: `Image Session ID` (if image content present). |
277 | | - - **1 byte**: `Image Segment info` (if image content present). |
278 | | - - **2 bytes**: Length of `Image` (if image content present). |
279 | | - - **Variable**: Value of `from` field (if text content present). |
280 | | - - **Variable**: Value of `to` field (if text content present). |
281 | | - - **Variable**: Value of `cc` field (if text content present). |
282 | | - - **Variable**: Value of `bcc` field (if text content present). |
283 | | - - **Variable**: Value of `subject` field (if text content present). |
284 | | - - **Variable**: Value of `body` field (if text content present). |
285 | | - - **Variable**: Value of `access_token` field (if text content present and token provided). |
286 | | - - **Variable**: Value of `refresh_token` field (if text content present and token provided). |
287 | | - - **Variable**: Value of `Image` (if image content present). |
| 259 | + - **Variable**: Value of `image` field. |
| 260 | + - **1 byte**: Length of `from` field. |
| 261 | + - **2 bytes**: Length of `to` field. |
| 262 | + - **2 bytes**: Length of `cc` field. |
| 263 | + - **2 bytes**: Length of `bcc` field. |
| 264 | + - **1 byte**: Length of `subject` field. |
| 265 | + - **2 bytes**: Length of `body` field. |
| 266 | + - **2 bytes**: Length of `access_token` field (optional). |
| 267 | + - **2 bytes**: Length of `refresh_token` field (optional). |
| 268 | + - **Variable**: Value of `from` field. |
| 269 | + - **Variable**: Value of `to` field. |
| 270 | + - **Variable**: Value of `cc` field. |
| 271 | + - **Variable**: Value of `bcc` field. |
| 272 | + - **Variable**: Value of `subject` field. |
| 273 | + - **Variable**: Value of `body` field. |
| 274 | + - **Variable**: Value of `access_token` field (if present). |
| 275 | + - **Variable**: Value of `refresh_token` field (if present). |
288 | 276 |
|
289 | 277 | 2. **Text format**: Binary-encoded fields with the following structure: |
290 | 278 |
|
291 | | - - **1 byte**: Content type indicator |
292 | | - - **1 byte**: Length of `from` field (if text content present). |
293 | | - - **2 bytes**: Length of `body` field (if text content present). |
294 | | - - **2 bytes**: Length of `access_token` field (if text content present and optional). |
295 | | - - **2 bytes**: Length of `refresh_token` field (if text content present and optional). |
296 | | - - **2 bytes**: `Image Session ID` (if image content present). |
297 | | - - **1 byte**: `Image Segment info` (if image content present). |
298 | | - - **2 bytes**: Length of `Image` (if image content present). |
299 | | - - **Variable**: Value of `from` field (if text content present). |
300 | | - - **Variable**: Value of `body` field (if text content present). |
301 | | - - **Variable**: Value of `access_token` field (if text content present and token provided). |
302 | | - - **Variable**: Value of `refresh_token` field (if text content present and token provided). |
303 | | - - **Variable**: Value of `Image` (if image content present). |
| 279 | + - **Variable**: Value of `image` field. |
| 280 | + - **1 byte**: Length of `from` field. |
| 281 | + - **2 bytes**: Length of `body` field. |
| 282 | + - **2 bytes**: Length of `access_token` field (optional). |
| 283 | + - **2 bytes**: Length of `refresh_token` field (optional). |
| 284 | + - **Variable**: Value of `from` field. |
| 285 | + - **Variable**: Value of `body` field. |
| 286 | + - **Variable**: Value of `access_token` field (if present). |
| 287 | + - **Variable**: Value of `refresh_token` field (if present). |
304 | 288 |
|
305 | 289 | 3. **Message format**: Binary-encoded fields with the following structure: |
306 | 290 |
|
307 | | - - **1 byte**: Content type indicator |
308 | | - - **1 byte**: Length of `from` field (if text content present). |
309 | | - - **2 bytes**: Length of `to` field (if text content present). |
310 | | - - **2 bytes**: Length of `body` field (if text content present). |
311 | | - - **2 bytes**: `Image Session ID` (if image content present). |
312 | | - - **1 byte**: `Image Segment info` (if image content present). |
313 | | - - **2 bytes**: Length of `Image` (if image content present). |
314 | | - - **Variable**: Value of `from` field (if text content present). |
315 | | - - **Variable**: Value of `to` field (if text content present). |
316 | | - - **Variable**: Value of `body` field (if text content present). |
317 | | - - **Variable**: Value of `Image` (if image content present). |
| 291 | + - **Variable**: Value of `image` field. |
| 292 | + - **1 byte**: Length of `from` field. |
| 293 | + - **2 bytes**: Length of `to` field. |
| 294 | + - **2 bytes**: Length of `body` field. |
| 295 | + - **Variable**: Value of `from` field. |
| 296 | + - **Variable**: Value of `to` field. |
| 297 | + - **Variable**: Value of `body` field. |
318 | 298 |
|
319 | 299 | 4. **Test format**: Binary-encoded fields with the following structure: |
320 | 300 |
|
321 | | - - **1 byte**: Length of `from` field (if text content present). |
322 | | - - **Variable**: Value of `from` field (considered the test ID, if text content present). |
| 301 | + - **1 byte**: Length of `from` field. |
| 302 | + - **Variable**: Value of `from` field (considered the test ID). |
323 | 303 |
|
324 | 304 | ## Supported Payload Versions |
325 | 305 |
|
|
0 commit comments