Skip to content
Info

The following adheres to Send API v3.0

Add Email Headers

In every message, you can specify your own Email headers using the Headers property. For example, it is possible to specify a Reply-To email address.

Example

# This call sends an email to one recipient with a Reply-To address.
curl -s \
	-X POST \
	--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
	https://api.mailjet.com/v3/send \
	-H 'Content-Type: application/json' \
	-d '{
		"FromEmail":"pilot@mailjet.com",
		"FromName":"Mailjet Pilot",
		"Subject":"Your email flight plan!",
		"Text-part":"Dear passenger, welcome to Mailjet! May the delivery force be with you!",
		"Html-part":"<h3>Dear passenger, welcome to <a href=\"https://www.mailjet.com/\">Mailjet</a>!<br />May the delivery force be with you!",
		"Recipients":[{"Email":"passenger@mailjet.com"}],
		"Headers" : {"Reply-To":"copilot@mailjet.com"}
	}'