works great with some tweaking

Excellent monitor. In some modern email systems the message is rejected, maybe due to antispam policies or the message not being compliant with some standards. The SMTP data bulk (starts at line 381) needs to be polished to something like this:

$smtp->data();
$smtp->datasend(“To: $receiver
“);
$smtp->datasend(“From: $sender
“);
$smtp->datasend(“Subject: E-Mail Ping [$serial]
“);
$smtp->datasend(“Content-Type: text/plain; charset=us-ascii; Content-Disposition: inline
“.
“This is an automatically sent E-Mail.
“.
“It is not intended for a human reader.

“.
“Serial No: $serial
“);
$smtp->dataend();

Once it includes the From field and the Content-Type tags it is accepted by al systems.