# rob@xxxxxxxxxxxxxxxxxx / 2007-02-05 00:22:57 +0000: > I need to send a large number of emails (not spam!) through an external > SMTP server that requires TLS and a username/password. I have some > control over the SMTP server but very little over the web server where > the scripts reside. How do I connect with TLS, authenticate and send the > mail? > > I had problems with mail() originally (one of the reasons why we now > have a dedicated mail server) and I had to connect to the SMTP server by > hand with sockets and go through the SMTP steps by hand. I can connect > to the new server with following code. > > $sock = fsockopen( 'smtp.eg.com', 25, $errNo, $errStr ); > > However, when I send the "rcpt to:" line, I'm told I don't have access > to the relay - i.e. I need to log in. This is where my knowledge of SMTP > reaches it's limit but I've read about the "auth login" command, > however, it says it needs to be run over an encrypted connection, i.e. > TLS. I can't disable this on the server, other services need TLS to be > on the SMTP server. Why don't you let your local MTA handle the things for you? -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php