$file='file.html'; $mime_msg->attach(Type => 'text/html', Path => $file, Filename => $file ) or die "Error attaching html: $!\n"; #### $file='file.html'; $mime_msg->attach(Type => 'text/html', Path => $file, Filename => $file ) or die "Error attaching html: $!\n"; $file2='attach.csv'; $mime_msg->attach(Type => 'application/csv', Path => $file2, Filename => $file2 ) or die "Error attaching html: $!\n";