46
General Help & How-To / Re: SMTP with Amazon SES Problem
« on: November 23, 2014, 05:08:13 pm »
Hi Franklin,
On two separate systems, the following PHP test script works:
The result when run from browser or commandline is e.g.:
For me, everything seems to be working as expected. The SMTP conversation should be able to continue as normal. LMP does it the same way.
If this test doesn't return similar results for you you will need to speak with your host as they may have limited or restricted such PHP socket connections or be experiencing a technical issue.
Regards
On two separate systems, the following PHP test script works:
Code: [Select]
<?php
error_reporting(E_ALL);
$sock=fsockopen('tls://email-smtp.us-east-1.amazonaws.com',465);
if($sock) echo "Socket established\n"; else exit("Socket could not be established\n");
echo fgets($sock,1024);
echo "> EHLO localhost\n";
fputs($sock,"EHLO localhost\r\n");
$line='';
while(substr($line,3,1)!==' '){
$line=fgets($sock,1024);
echo $line;
}
The result when run from browser or commandline is e.g.:
Code: [Select]
Socket established
220 email-smtp.amazonaws.com ESMTP SimpleEmailService-908880847 2G85c3kZxdN3aiX48I3
> EHLO localhost
250-email-smtp.amazonaws.com
250-8BITMIME
250-SIZE 10485760
250-AUTH PLAIN LOGIN
250 Ok
For me, everything seems to be working as expected. The SMTP conversation should be able to continue as normal. LMP does it the same way.
If this test doesn't return similar results for you you will need to speak with your host as they may have limited or restricted such PHP socket connections or be experiencing a technical issue.
Regards