# How to send emails with Adalo using Postmark

![Send email with Adalo using Postmark](https://cdn.hashnode.com/res/hashnode/image/upload/v1685598737847/80e6ddc3-55c1-4302-8b31-4423dc60a0fd.png)

What is Postmark?  

--------------------

Postmark is the email delivery service that developers and product teams actually like. Send transactional and marketing emails and get them to the inbox every time.  
  
Postmark maintains one of the best delivery reputations in the industry by routing transactional and promotional messages through parallel but separate sending infrastructure. (source: [G2](https://www.g2.com/products/postmark/reviews))

What is Adalo?  

-----------------

Adalo is a no-code app development platform that enables you to build an app without writing a single line code.  

You can publish the App to the web or App Store and Play Store without writing code.  

If you're new to no-code, check out the post on [Beginner's guide to No-Code](https://www.nocode.how/beginners-guide-to-no-code-cktjigno117501osbhtxw5foc/).​

Integrating Adalo with Postmark
-------------------------------

### Create an account with Postmark and generate a Server API Token  

Once you create a Postmark account, you'll need to create a server to start sending emails.   

After creating the server, follow the steps below to get the server API token.  

1.  ​Click on the server name  
    
2.  Click API Tokens
3.  Copy the API Token   
    

![Postmark Server API Token](https://cdn.hashnode.com/res/hashnode/image/upload/v1685598740349/348df8fc-3730-46e0-a94d-e0837533cc0e.png)

Once you have the API Token ready, you can access the Postmark [API docs here](https://postmarkapp.com/developer/api/email-api).

### Setup custom actions in Adalo to send emails with Postmark

Create new Custom Action in Adalo  

![custom action ](https://cdn.hashnode.com/res/hashnode/image/upload/v1685598742536/df38aa02-7de6-4c49-93a8-1cccd581800a.png)

Click "Next" to configure the custom action  

![custom action configuration](https://cdn.hashnode.com/res/hashnode/image/upload/v1685598744935/47fc3e7b-3bc1-45bf-92d3-15926285af46.png)

Custom action requires the following parameters:

1.  ​API Base URL  
    1.   https://api.postmarkapp.com/email
2.  Method (POST) - Sending data through an API  
    1.   POST
3.  Headers   
    1.  Accept: application/JSON
    2.  Content-Type: application/JSON  
        
    3.  X-Postmark-Server-Toekn: <your server API token>  
        
4.  Inputs (from, to, subject, body)  
    1.  From (sender email)
    2.  To (recipient email)  
        
    3.  Subject   
        
    4.  Body (email body)
5.  Body in JSON format  
    

Below is the format from Postmark's [API documentation](https://postmarkapp.com/developer/api/email-api)​  

> #### Example request with curl
> 
>     curl "https://api.postmarkapp.com/email" \  -X POST \  -H "Accept: application/json" \  -H "Content-Type: application/json" \  -H "X-Postmark-Server-Token: server token" \  -d'{  "From": "sender@example.com",  "To": "receiver@example.com",  "Subject": "Postmark test",  "TextBody": "Hello dear Postmark user.",  "HtmlBody": "<html><body><strong>Hello</strong> dear Postmark user.</body></html>",  "MessageStream": "outbound"}'

Configure the API request in Adalo as shown below based on the documentation from Postmark  

![configure custom action](https://cdn.hashnode.com/res/hashnode/image/upload/v1685598746766/6d85244b-4752-4f14-a094-5b1e6472e1f0.png)

As shown in step 4, the inputs can be configured to send dynamic data and use Magic Text in step 5.

Once all the setup is complete, click "RUN TEST REQUEST" to send your first email via Postmark.

![Postmark email sent](https://cdn.hashnode.com/res/hashnode/image/upload/v1685598749084/85ad7331-04ec-4c48-9474-7c64114a0dfd.png)

Upon successful test, save the custom action to send emails from your application.  

Trigger your custom action in Adalo and send the dynamic values to the custom action using magic text in Adalo. 

![custom action in Adalo](https://cdn.hashnode.com/res/hashnode/image/upload/v1685598751039/3f1c5253-6b99-47d6-9668-5d0f14036b0e.png)

Use the custom action every time you wish to send an email from your Adalo application.  

Congratulations! You have successfully set up your email integration with Postmark for your Adalo app.  

If you're new to No-Code, you can access beginner's tutorials from [here](https://www.nocode.how/beginners-guide-to-no-code-cktjigno117501osbhtxw5foc/).  

​
