### Format as a string: $str = $msg->as_string; ### Print to a filehandle (say, a "sendmail" stream): $msg->print(\*SENDMAIL);