Post Mark and emails

0
I have a booking app that I am developing and I'm aiming to have the app send users a confirmation email upon booking. I attempted to connect the email connector however I am unable to authenticate my outlook email address. Per this blog post https://community.mendix.com/link/space/connectors/questions/132399 I see that you can use an API in Post Mark. However, I have no idea where to even get started on something like this (I am fairly new to development and apis in general). Can somebody please tell me a brief overview of what steps I would need to take to achieve this? 
asked
1 answers
2

Once you have an account on PostMark goto https://postmarkapp.com/developer/api/email-api

On the righthand side there is a json structure that represents the body the api is expecting, copy this.

In Mendix create a json structure document and paste the json in the new document and refresh the structure.

Add a export mapping document, select the elements by selecting the created json structure and make sure that you select all the elements.

Now with the button map automatically the export mapping will be filled and the entities that you need will be created in the doamin model.

Create a microflow, add the root object as you input parameter and add a call REST action, select the request tab. Select the  option Export mapping for the entire request and select the created export mapping. Select the root object as the input parameter.

TO recieve the response on your request copy the json from the PostMark page under response. Create a new json structure with this json and create an import mapping. Follow the same steps as before and set the new mappnig on the response tab of the call REST activity in your microflow. Now you need to fill the different entities that were created for the export mapping and call the microflow. DO not forget to set the required headers from the PostMark page in the httpheader section of the call REST activity. 

Now you should be good to go to use your new REST API to send an email.

answered