PHP Classes

Unable to send mail due to TSL

Recommend this page to a friend!

      MIME E-mail message sending  >  MIME E-mail message sending package blog  >  How Can PHP Send Emai...  >  All threads  >  Unable to send mail due to TSL  >  (Un) Subscribe thread alerts  
Subject:Unable to send mail due to TSL
Summary:Having problems because the server uses TSL
Messages:5
Author:Victor Rivas
Date:2008-11-06 14:02:39
Update:2008-11-09 20:05:03
 

  1. Unable to send mail due to TSL   Reply   Report abuse  
Picture of Victor Rivas Victor Rivas - 2008-11-06 14:02:39
Hi Manuel and everyone,

First of all, congratulations for your work.

I am trying to use your class. I have modified test_smtp_mail.php in order to send mail through a server that uses TSL.
I have had not success at all.
I have been tracing the code, and found out that the "problem" starts in function Connect of smtp class. It returns 0 because esmtp_extensions["AUTH"] is not set. When I force this function to return 1, the server rejects the email.
I would really appreciate any help, although I am reading the rest of forums related to classes smtp and sasl.


"Obrigado",
Victor

  2. Re: Unable to send mail due to TSL   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-06 18:31:20 - In reply to message 1 from Victor Rivas
You need to set the class variable smtp_ssl to 1. Take a look at the test_smtp_message.php instead.

  3. Re: Unable to send mail due to TSL   Reply   Report abuse  
Picture of Victor Rivas Victor Rivas - 2008-11-07 16:36:36 - In reply to message 2 from Manuel Lemos
Thanks Manuel.
Anyway, there exists any other kind of problem, because fsockopen can not open a socket to the server using tls
I mean:
If I try open a socket to the server using
@fsockopen("server.domain.com", 25, $errno, $errstr )

I got no error (although I can not send mails since the server does not allow me).

But, when I try:
@fsockopen( "ssl://server.domain.com", 587, $errno, $errstr )

(587 is the port our server uses for ssl)

or

@fsockopen( "tls://server.domain.com", 25 , $errno, $errstr )

it returns $errno=0 but no connection is open.

I have used strace trying to get some information, but I always shows the (almost) same information.

Any idea?
Thanks, again
Victor

  4. Re: Unable to send mail due to TSL   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-07 20:21:25 - In reply to message 3 from Victor Rivas
Usually SMTP SSL port is 465.

  5. Re: Unable to send mail due to TSL   Reply   Report abuse  
Picture of Victor Rivas Victor Rivas - 2008-11-09 20:05:03 - In reply to message 4 from Manuel Lemos
Thanks for your answer.
In our organization they have chown 587 as the ssl port.
I have tried 465 in any case, but it did not work.
I will try to contact with our Computer System Service, because I really do not know what is happening.
Thanks,
Victor