<?php
// API endpoint URL
$url = "https://d...content-available-to-author-only...o.com/v1.1/as/email";
// Payload containing email details
$payload = [
"Content" => [
"Simple" => [
"Body" => [
"Html" => [
"Charset" => "UTF-8",
"Data" => "<p>Hello from Example</p>"
],
"Text" => [
"Charset" => "UTF-8",
"Data" => "Hello from Example"
]
],
"Subject" => [
"Charset" => "UTF-8",
"Data" => "Test subject"
]
]
],
"Destination" => [
"BccAddresses" => [
"recipient1@example.com"
],
"CcAddresses" => [
"recipient2@example.com"
],
"ToAddresses" => [
"sanjay.ar+1@zohotest.com"
]
],
"FeedbackForwardingEmailAddress" => "bounce@example.com",
"FromEmailAddress" => "sender@dip.nashs.in",
"ReplyToAddresses" => [
"sender@dip.nashs.in"
]
];
// Headers containing authorization and content-type
$headers = [
"Authorization: Zoho-enczapikey OlyO55SFNR52zZVwfsDPjKW1zEyn96ULj3QQa6C6gTGQlXfjAR2hEJRXYXeeP8MkxaQb8PoDn6n1GcPYmXTN6Mr0U7r1r40KeItwz2yAguFPHC4cFJxdQGIvfrr+u5uqJUHTEiQ2t2m2tQ==",
"Accept: application/json",
"Content-Type: application/json"
];
// Initialize cURL session
// Set cURL options
// Execute the POST request
// Check for errors
if ($response === false) {
echo "Error: $error";
} else {
// Parse and print the response
}
// Close cURL session
?>
PD9waHAKCi8vIEFQSSBlbmRwb2ludCBVUkwKJHVybCA9ICJodHRwczovL2QuLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLm8uY29tL3YxLjEvYXMvZW1haWwiOwoKLy8gUGF5bG9hZCBjb250YWluaW5nIGVtYWlsIGRldGFpbHMKJHBheWxvYWQgPSBbCiAgICAiQ29udGVudCIgPT4gWwogICAgICAgICJTaW1wbGUiID0+IFsKICAgICAgICAgICAgIkJvZHkiID0+IFsKICAgICAgICAgICAgICAgICJIdG1sIiA9PiBbCiAgICAgICAgICAgICAgICAgICAgIkNoYXJzZXQiID0+ICJVVEYtOCIsCiAgICAgICAgICAgICAgICAgICAgIkRhdGEiID0+ICI8cD5IZWxsbyBmcm9tIEV4YW1wbGU8L3A+IgogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICJUZXh0IiA9PiBbCiAgICAgICAgICAgICAgICAgICAgIkNoYXJzZXQiID0+ICJVVEYtOCIsCiAgICAgICAgICAgICAgICAgICAgIkRhdGEiID0+ICJIZWxsbyBmcm9tIEV4YW1wbGUiCiAgICAgICAgICAgICAgICBdCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJTdWJqZWN0IiA9PiBbCiAgICAgICAgICAgICAgICAiQ2hhcnNldCIgPT4gIlVURi04IiwKICAgICAgICAgICAgICAgICJEYXRhIiA9PiAiVGVzdCBzdWJqZWN0IgogICAgICAgICAgICBdCiAgICAgICAgXQogICAgXSwKICAgICJEZXN0aW5hdGlvbiIgPT4gWwogICAgICAgICJCY2NBZGRyZXNzZXMiID0+IFsKICAgICAgICAgICAgInJlY2lwaWVudDFAZXhhbXBsZS5jb20iCiAgICAgICAgXSwKICAgICAgICAiQ2NBZGRyZXNzZXMiID0+IFsKICAgICAgICAgICAgInJlY2lwaWVudDJAZXhhbXBsZS5jb20iCiAgICAgICAgXSwKICAgICAgICAiVG9BZGRyZXNzZXMiID0+IFsKICAgICAgICAgICAgInNhbmpheS5hcisxQHpvaG90ZXN0LmNvbSIKICAgICAgICBdCiAgICBdLAogICAgIkZlZWRiYWNrRm9yd2FyZGluZ0VtYWlsQWRkcmVzcyIgPT4gImJvdW5jZUBleGFtcGxlLmNvbSIsCiAgICAiRnJvbUVtYWlsQWRkcmVzcyIgPT4gInNlbmRlckBkaXAubmFzaHMuaW4iLAogICAgIlJlcGx5VG9BZGRyZXNzZXMiID0+IFsKICAgICAgICAic2VuZGVyQGRpcC5uYXNocy5pbiIKICAgIF0KXTsKCi8vIEhlYWRlcnMgY29udGFpbmluZyBhdXRob3JpemF0aW9uIGFuZCBjb250ZW50LXR5cGUKJGhlYWRlcnMgPSBbCiAgICAiQXV0aG9yaXphdGlvbj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