my $mime = MIME::Lite->new( From => 'admin@server', To => 'you@overthere', Subject => "Your invoice", Type => 'multipart/mixed', ); $mime->attach( Data => 'Heres your invoice' ); $mime->attach( Data => $invoice_as_pdf, Type => 'AUTO', Disposition => 'attachment', Filename => 'invoice.pdf' ); $mime->send( 'sendmail', FromSender => 'admin@server' );