#================================================================ #- Send info #================================================================ # sub send_info { # Adjust sender, recipient and your SMTP mailhos my $from_address = $from; my $to_address = $infoemail; # Adjust subject and body message my $message_body = "

The following visitor requested information.

Name: $string
E-mail: $email
"; my $subject = "$string is requesting information."; # Create the multipart container my $msg = MIME::Lite->new ( From => $from_address, To => $to_address, BCC => $bcc, Subject => "=?UTF-8?B?" . encode_base64( $subject, "" ) . "?=", Type =>'multipart/mixed' ) or die "Error creating multipart container: $!\n"; # Add the text message part $msg->attach ( Type => 'text/html', Data => qq{ $message_body } ) or die "Error adding the text message part: $!\n"; # Now send $msg->attr('content-type.charset' => 'UTF-8'); $msg->send("sendmail") or die "Error e-mailing: $!\n"; }