Problem with sending emaisl via own mailserv with TLS :-(
Posted: Wed Dec 24, 2008 6:28 am
I have some kind of problem with sending email through my emailserver...
when I`m login on my mailserver it looks like this...
using this code I found nothing in my mailserv logs...
If I change the authenticator to PLAIN (but as you can see only TLS connectiooons are allowed) i get smth like this
Telling the truth I don`t know what kind of autheticator should I use...Fatal error: Uncaught exception 'Swift_ConnectionException' with message 'The SMTP connection failed to start [tls://bluebyte.net.pl:465]: fsockopen returned Error Number 10060 and Error String 'Próba po?šczenia nie powiod?a si?, poniewa? po?šczona strona nie odpowiedzia?a poprawnie po ustalonym okresie czasu lub utworzone po?šczenie nie powiod?o si?, poniewa? po?šczony host nie odpowiedzia?. '' in E:\AppServ 2.4.6\www\air2\funkcje\swift_mailer_v3.3.3\Swift\Connection\SMTP.php:309 Stack trace: #0 E:\AppServ 2.4.6\www\air2\funkcje\swift_mailer_v3.3.3\Swift.php(216): Swift_Connection_SMTP->start() #1 E:\AppServ 2.4.6\www\air2\funkcje\swift_mailer_v3.3.3\Swift.php(101): Swift->connect() #2 E:\AppServ 2.4.6\www\air2\testowy2.php(10): Swift->__construct(Object(Swift_Connection_SMTP)) #3 {main} thrown in E:\AppServ 2.4.6\www\air2\funkcje\swift_mailer_v3.3.3\Swift\Connection\SMTP.php on line 309
when I`m login on my mailserver it looks like this...
Code: Select all
bb-mailserv:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 bb-mailserv.bluebyte.net.pl ESMTP Postfix (Debian/GNU)
ehlo bluebyte.net.pl
250-bb-mailserv.bluebyte.net.pl
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
Code: Select all
<?php
require_once("funkcje/swift_mailer_v3.3.3/Swift.php");
require_once "funkcje/swift_mailer_v3.3.3/Swift/Connection/SMTP.php";
require_once "funkcje/swift_mailer_v3.3.3/Swift/Authenticator/LOGIN.php";
$swift = new Swift(new Swift_Connection_SMTP("bluebyte.net.pl", Swift_Connection_SMTP::PORT_SECURE, Swift_Connection_SMTP::ENC_TLS));
$conn->attachAuthenticator(new Swift_Authenticator_LOGIN());
$conn->setUsername("technik");
$conn->setPassword("****");
$swift =& new Swift($conn);
//Create the message
$message =& new Swift_Message("My subject", "My body");
$recipients =& new Swift_RecipientList();
$recipients->addTo("taisu[at].xl");
if($swift->batchSend($message, $recipients, "technik[at]bluebyte.net")) echo Sent;
else echo "Failed";
?>Code: Select all
Dec 24 12:58:32 bb-mailserv postfix/smtpd[14917]: connect from xxx.tpnet.pl[xxxx]
Dec 24 12:58:32 bb-mailserv postfix/smtpd[14917]: lost connection after RSET from xxx.tpnet.pl[xxxx]
Dec 24 12:58:32 bb-mailserv postfix/smtpd[14917]: disconnect from xxx.tpnet.pl[xxx]