Link Search Menu Expand Document

Send Email - PowerShell

Email Send and Decode sample in PowerShell demonstrating ‘Send Email’

# Please refer to our knowledge base at ( for SMTP related information

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("x-api-key", "Add_Your_PDFco_Api_Key")

$body = "{`n    `"url`": `"`",`n    `"from`": `"John Doe <>`",`n    `"to`": `"Partner <>`",`n    `"subject`": `"Check attached sample pdf`",`n    `"bodytext`": `"Please check the attached pdf`",`n    `"bodyHtml`": `"Please check the attached pdf`",`n    `"smtpserver`": `"`",`n    `"smtpport`": `"587`",`n    `"smtpusername`": `"`", `n    `"smtppassword`": `"app specific password created as`",`n    `"async`": false`n}"

$response = Invoke-RestMethod '' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json Web API: the Web API with a set of tools for documents manipulation, data conversion, data extraction, splitting and merging of documents. Includes image recognition, built-in OCR, barcode generation and barcode decoders to decode bar codes from scans, pictures and pdf.

Get your API key here!

Download Source Code (.zip)

return to the previous page explore Email Send and Decode endpoint