Answer the question
In order to leave comments, you need to log in
How to send email via Postmark API?
Currently using SMTP
$this->mailer->send('emails.email-verification', ['user' => $user, 'redirectURI' => $redirectURI], function (Message $message) use ($user) {
$message->to($user->email, $user->first_name);
$message->subject('Verify your ArtDatabase Account.');
});
$message = [
'To' => "[email protected]",
'From' => "[email protected]",
'TrackOpens' => true,
'Subject' => "A complex email",
'TextBody' => "Plain Text Body",
'HtmlBody' => "<html><body><img src=\"cid:attachment-file-name.jpg\"/></body></html>",
'Tag' => "New Year's Email Campaign",
'Headers' => [ "X-CUSTOM-HEADER" => "Header content"],
'Attachments' => [$attachment]
];
$client = new PostmarkClient("<server token>");
$sendResult = $client->sendEmailBatch([$message]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question