2
API - Can I send emails via API insteald os WebForms ?
Question asked by Curtis Kropar www.HawaiianHope.org - 7/19/2018 at 9:27 AM
Answered
HI All.
I have been looking for info and cant seem to find anything useful.
Previous questions regarding API's generally fall into 2 categories, either not answered or answered with "documentation is coming later" (smarterPeeps seem to have been saying that for like 2 years now)
 
Simple question. 
Instead of using Webforms, ASP scrips and CDONTS/CDOsys, can i send emails from web pages using API calls into smartermail ?
We are currently using SM Enterprise 14.xxxxxx, cant tell if this is possible.
Will consider upgrading to 15, 16 or 17 or 32 or 54 if it gets the job done.. but cant find anything to base decisions on
 
I want to take our database of over 13,000 contacts (for our org, and thousands of more contacts for other orgs we serve) and generate emails directly, and have them signed with the proper smartermail DKIM / reverse whatevers and dns lookups so that they get delivered.  Emails sent with the CDOsys are not always delivered and often getting tagged as spam

www.HawaiianHope.org - Providing technology services to non profit organizations, low income families, homeless shelters, clean and sober houses and prisoner reentry programs. Since 2015, We have refurbished over 11,000 Computers !

4 Replies

Reply to Thread
0
Matt Petty Replied
Employee Post Marked As Answer
The APIs for authentication are there, which is for writing a service or program is probably the most important. The other APIs are not documented but they can be reverse engineered using a browsers network console which unfortunately isn't the easiest process. However, if you are interested I have still included some documentation of the mail api as it is today.

POST /api/v1/mail/message-put
Fields are bcc, cc, from, subject, to, messagePlainText, messageHTML
There are more but these are the common sending variables. I'd say the ones provided in my example are the bare minimum 'subject', 'to', and 'messagePlainText'.

Here is a video example using Postman.
 
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Employee Replied
Employee Post
Along with Matt's response, we have an example from an internal tool that we wouldn't mind sharing if you want to see a code example.
0
Awesome !
So, this will work with 14 right now ?
And.. if i understand correctly, sending through the API will then "sign" the emails with the proper DKIM, PTR, whatever... LMNOP... that is needed to show that it is a legit email from a legit domain.  yes ?
www.HawaiianHope.org - Providing technology services to non profit organizations, low income families, homeless shelters, clean and sober houses and prisoner reentry programs. Since 2015, We have refurbished over 11,000 Computers !
0
Employee Replied
Employee Post
Hello Curtis, sorry we weren't clear, this is with the new api in 16+. Sending messages through the api though will put them in the spool so they get processed by SmarterMail normally.

Reply to Thread