You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is an example of how I currently send a multipart/alternative with CURL. I write this email in a text editor, save it to a file and use CURL to send the whole thing.
To: "John Connor" <[email protected]>
From: "Sarah Connor" <[email protected]>
Subject: A multipart/alternative text/plain + text/html email
MIME-Version: 1.0 (Created with SublimeText 3)
Content-Type: multipart/alternative; boundary="content-boundary-alternative"
Preamble: This is a multipart/alternative message in MIME format.
--content-boundary-alternative
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Good morning.
This is a message in text/plain format.
--content-boundary-alternative
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang=3D"en">
<head>
<meta charset=3D"utf-8">
<meta http-equiv=3D"Content-Type" content=3D"text/html">
</head>
<body>
Good morning.<br/>
<br/>
This is a message in text/html format.<br/>
</body>
</html>
--content-boundary-alternative--
While reading the CURL manpage, more specifically, https://curl.se/docs/manpage.html#-F I noticed there seems to be a way to properly encode the quoted-printable text/html content for transfer using -F, --formencoder=quoted-printable so that I don't have to do it manually.
I must say that your manual is incredibly lacking in this specific topic with a single paragraph worth of information and exactly ZERO examples.
Can anyone provide an adaptation of my approach that includes encoder=quoted-printable?
I have a feeling this calls for the headers and the bodies to be placed in separate files but I'm still reading.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Below is an example of how I currently send a multipart/alternative with CURL. I write this email in a text editor, save it to a file and use CURL to send the whole thing.
Then I send it like this:
So far so good.
While reading the CURL manpage, more specifically, https://curl.se/docs/manpage.html#-F I noticed there seems to be a way to properly encode the quoted-printable text/html content for transfer using
-F, --form
encoder=quoted-printable
so that I don't have to do it manually.I must say that your manual is incredibly lacking in this specific topic with a single paragraph worth of information and exactly ZERO examples.
Can anyone provide an adaptation of my approach that includes
encoder=quoted-printable
?I have a feeling this calls for the headers and the bodies to be placed in separate files but I'm still reading.
Beta Was this translation helpful? Give feedback.
All reactions