replace
<smtp-server>
with your host of SMTP serverreplace
<username>
with your usernamereplace
<password>
with your password
curl \--ssl-reqd \--url 'smtp://<smtp-server>:2525' \
--user '<username>:<password>' \
--mail-from from@example.com \
--mail-rcpt to@example.com \
--upload-file - <<EOF
From: Rex Wu <from@example.com>
To: My Inbox <to@example.com>
Subject: You are awesome!
Content-Type: multipart/alternative; boundary="boundary-string"
--boundary-string
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
If you are viewing this email in your inbox =E2=80=93 the integration works.
Now send your email using our SMTP server and integration of your choice!
Good luck! Hope it works.
--boundary-string
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
<!doctype html>
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8">
</head>
<body style=3D"font-family: sans-serif;">
<div style=3D"display: block; margin: auto; max-width: 600px;" class=3D"main">
<h1 style=3D"font-size: 18px; font-weight: bold; margin-top: 20px">Congrats for sending test email!</h1>
<p>Good luck! Hope it works.</p>
</div>
<style>
.main { background-color: white; }
a:hover { border-left-width: 1em; min-height: 2em; }
</style>
</body>