Perform mail merging on a document and send it to the specified email address. This version takes just a few arguments. To provide DynamicTags use the POST version.
Put
/API/Rest/Documents/TestSend
documentName
emailAddress
ViewDocument
No Permission
Invalid email address
Invalid document name
Invalid document type
No DNS MX entries for this domain
No virtual IP address configured
Unable to find a address that can be used for sending
An error occurred attempting to mail merge
Unable to retrieve dynamic mail merge data
The receiving mail server did not accept the mail, returning a message indicating the IP address has been blocked
The receiving mail server did not accept our attempt to connect
The receiving mail server returned a temporary failure code, implementing a strategy called "greylisting"
The receiving mail server said the mailbox is full
The receiving mail server did not accept the mail, complaining about too much email being sent, but saying that you could try again later
The receiving mail server rejected the mail, categorizing it as SPAM
The receiving mail server rejected the mail saying that the email address is unknown
The receiving mail server rejected the mail for an unknown reason
Database error
Unknown error
The document was accepted by the receiving mail server
Send a test document.
using System;
using System.Net.Http;
string url = "https://example.com/API/Rest/Documents/TestSend?accountName=acme&login=ApiUser&emailAddress=joe@example.com&documentName=TestDoc";
// Reuse HttpClient for multiple requests in production code.
using (var client = new HttpClient())
using (var request = new HttpRequestMessage(HttpMethod.Put, url))
{
request.Headers.Add("Password", "YOUR_PASSWORD");
using (HttpResponseMessage response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
# encoding: utf-8
require 'rest-client'
require 'json'
url = 'https://example.com/API/Rest/Documents/TestSend?accountName=acme&login=ApiUser&emailAddress=joe@example.com&documentName=TestDoc'
response = RestClient.put(url, "", {:Password => "YOUR_PASSWORD"})
puts response
import requests
url = "https://example.com/API/Rest/Documents/TestSend?accountName=acme&login=ApiUser&emailAddress=joe@example.com&documentName=TestDoc"
headers = {'password':'YOUR_PASSWORD'}
resp = requests.put(url, headers=headers)
if resp.status_code == 200:
print(resp.text)
curl --request PUT --header "Password: YOUR_PASSWORD" "https://example.com/API/Rest/Documents/TestSend?accountName=acme&login=ApiUser&emailAddress=joe@example.com&documentName=TestDoc"