We can send emails through HubSpot CRM using SMTP API. For sending email SMTP, first, we need to create the SMTP tokens.
Generate SMTP API Tokens
An API token provides both a username and password which can then be used to send email through the HubSpot SMTP API. We can create an SMTP token using the API link below.
https://api.hubapi.com/email/public/v1/smtpapi/tokens?hapikey=demo
Example: Use the following code for generating json code,