Examples: Notificator
cURL Linux:
curl --location --request POST 'https://services.geodan.nl/notification/v2/email?servicekey=FILL_IN_YOUR_SERVICEKEY' \ --header 'Content-Type: application/json' \ --data-raw '{ "sender": "GeodanMaps Test", "recipients": [ { "firstName": "Receiver", "lastName": "of Test", "address": "FILL_IN_AN_EMAIL_ADDRESS" } ], "subject": "Test using GeodanMaps NotificationService", "content": { "text" : "Dear reader,\n\nThis is an email in plain text.\n\nRow 1, cell 1\tRow 1, cell 2\nRow 2,cell 1\tRow 2, cell 2\n\nRegards,\n\nGeodanMaps", "html": "<p>Dear reader,</p><p> </p><p>This is an email in <strong>HTML code</strong>.</p><table><tbody><tr><td>Row 1, cell 1</td><td>Row 1, cell 2</td></tr><tr><td>Row 2, cell 1</td><td>Row 2, cell 2</td></tr></tbody></table><p> </p><p>Regards,</p><p> </p><p>GeodanMaps <img src=\"https://html-online.com/editor/tinymce4_6_5/plugins/emoticons/img/smiley-wink.gif\" alt=\"wink\" /></p>" } }'
Powershell Windows:
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("Content-Type", "application/json") $body = "{`n `"sender`": `"GeodanMaps Test`",`n `"recipients`": [`n {`n `"firstName`": `"Receiver`",`n `"lastName`": `"of Test`",`n `"address`": `"FILL_IN_AN_EMAIL_ADDRESS`"`n }`n ],`n `"subject`": `"Test using GeodanMaps NotificationService`",`n `"content`": {`n `"text`" : `"Dear reader,`\n`\nThis is an email in plain text.`\n`\nRow 1, cell 1`\tRow 1, cell 2`\nRow 2,cell 1`\tRow 2, cell 2`\n`\nRegards,`\n`\nGeodanMaps`",`n `"html`": `"<p>Dear reader,</p><p> </p><p>This is an email in <strong>HTML code</strong>.</p><table><tbody><tr><td>Row 1, cell 1</td><td>Row 1, cell 2</td></tr><tr><td>Row 2, cell 1</td><td>Row 2, cell 2</td></tr></tbody></table><p> </p><p>Regards,</p><p> </p><p>GeodanMaps <img src=`\`"https://html-online.com/editor/tinymce4_6_5/plugins/emoticons/img/smiley-wink.gif`\`" alt=`\`"wink`\`" /></p>`"`n }`n}" $response = Invoke-RestMethod 'https://services.geodan.nl/notification/v2/email?servicekey=FILL_IN_YOUR_SERVICEKEY' -Method 'POST' -Headers $headers -Body $body $response | ConvertTo-Json
[contact-form-7 404 "Not Found"]