print MAIL "encode_base64( read_file($attachment) )"; open(FILE, '<', $attachment) or die "Cannot open $attachment: $!"; print MAIL ;