I had the same problem, but I found a solution that stitches for work. Open the socket in PHP and telnetting raw emails. Something like that:
$lSmtpTalk = array( array('220', 'HELO my.hostname.com'.chr(10)), array('250', 'MAIL FROM: me@hostname.com '.chr(10)), array('250', 'RCPT TO: you@anotherhost.com '.chr(10)), array('250', 'DATA'.chr(10)), array('354', $lTheRawEmailStringWithHeadersAndBody.chr(10).'.'.chr(10)), array('250', 'QUIT'.chr(10)), array('221', '')); $lConnection = fsockopen('mail.anotherhost.dk', 25, $errno, $errstr, 1); if (!$lConnection) abort('Cant relay, no connnection'); for ($i=0;$i<count($lSmtpTalk);$i++) { $lRes = fgets($lConnection, 256); if (substr($lRes, 0, 3) !== $lSmtpTalk[$i][0]) abort('Got '.$lRes.' - expected: '.$lSmtpTalk[$i][0]); if ($lSmtpTalk[$i][1] !== '') fputs($lConnection, $lSmtpTalk[$i][1]); } fclose($lConnection);
You may need to find mx-host if you do not know this. Google has an answer to this, I'm sure.
source share