I send a newsletter to 10k+ recipients.
To handle this, I wrote a function that uses the socket php functions. So I put Line by Line to the other Mailserver:
Code: Select all
fputs($connection, "HELO $mydomain\r\n");Now my Problem:
The transmission is very slow, so I could be >24h to send out all newsletter.
I've look around and found the swift mailer.
This looks pretty nice, so I lovely want to use it for my application.
But is it possible to return the bounce-code (e.g. 540) if a failure occurs?
At the moment, I do it so:
Code: Select all
fputs($connection, "HELO $mydomain\r\n");
$res=fgets($connection,1024);
if(substr($res,0,3) != "250"){
$ret = substr($res,0,3);
fputs($connection, "QUIT\r\n");
fclose ($connection);
return $ret;
}I hope you understand what I mean
Greetings and thanks,
Thomas