Usually, you have the output you want to mail in a variable, and then use code that is quite similar to the SYNOPSIS section of MIME::Lite to send the mail.
Basically instead of wherever you have print in your code, you could use
$output .= "whatever...";
to append to the variable $output.
When you feel ready to send the mail, create the MIME::Lite object and send the mail according to the SYNOPSIS section of MIME::Lite, giving the Type as TEXT and the Data as $output. |