Yes, you can use an IOBuffer in the pipeline like so:
message = """
To: myTestAddress@gmail.com
From: myFromAdress@myServer.org
Subject: One-line subject
This is the content of the email."""
sendEmailCmd = pipeline(IOBuffer(message), `sendmail -t`)
run(sendEmailCmd)