post https://api.cakemail.dev/emails
Using the SDK
from cakemail.models import Email, EmailContent, Sender
api.transactional_email.send(
email=Email(
email='<recipient email address>',
sender=Sender(id='<sender ID>'),
content=EmailContent(
subject='<subject line>',
text='<email body>',
encoding='utf-8'
)
)
)
<?php
$api->transactional_email->send([
'email' => new \Cakemail\Lib\Model\Email([
'email' => '<recipient email address>',
'sender' => new \Cakemail\Lib\Model\Sender([
'id' => '<sender ID>'
]),
'content' => new \Cakemail\Lib\Model\EmailContent([
'subject' => '<subject line>',
'html' => '<email body>',
'encoding' => 'utf-8'
])
])
]);