API for auto-system emails

Yeah, I tried some headers. None of them works fine for me. All the headers are requiring the what email client is used. In my case, I am using a script. I am worrying about being blocked by Gmail, if I keep trying different headers.

BODY = "\n".join((
	"To: %s" % TO,
	"From: %s" % FROM,
	"Subject: %s" % SUBJECT,
	"Date: %s" % str(datetime.now()),
	"Return-Path: %s" % FROM,
	"Envelope-To: %s" % TO,
	"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:45.0)",
	" Gecko/20100101 Thunderbird/45.8.0",
	"MIME-Version: 1.0",
	"Content-Type: text/plain; charset=utf-8",
	"Content-Transfer-Encoding: 7bit",
	text,
	"\r\n"))

I will try the Mailgun today later.