W5200 pop & smtp
twc
Posts: 107
Hey Mike:
I was trying PopUnitTest and SmtpUnitTest and both having a problem connecting (i.e. stuck waiting for sock.Connected) to e-mail at socal.rr.com. I tried a different e-mail (at att.yahoo.com) and was able to connect which would seem to rule out unrelated issues. Unfortunately the att.yahoo.com e-mail requires SSL. If it's not to much trouble could I ask you please confirm whether you can connect to the pop and smtp servers at socal.rr.com? Thanks as always for your support.
PopUnitTest
sock.RemoteIp(71,74,56,68) 'pop-server.socal.rr.com
sock.RemotePort(110)
' sock.RemoteIp(67,195,135,148) 'pop.att.yahoo.com
' sock.RemotePort(995)
SmtpUnitTest
sock.RemoteIp(71,74,56,22) 'smtp-server.socal.rr.com
sock.RemotePort(25)
' sock.RemoteIp(98,139,221,42) 'smtp.att.yahoo.com
' sock.RemotePort(465)
I was trying PopUnitTest and SmtpUnitTest and both having a problem connecting (i.e. stuck waiting for sock.Connected) to e-mail at socal.rr.com. I tried a different e-mail (at att.yahoo.com) and was able to connect which would seem to rule out unrelated issues. Unfortunately the att.yahoo.com e-mail requires SSL. If it's not to much trouble could I ask you please confirm whether you can connect to the pop and smtp servers at socal.rr.com? Thanks as always for your support.
PopUnitTest
sock.RemoteIp(71,74,56,68) 'pop-server.socal.rr.com
sock.RemotePort(110)
' sock.RemoteIp(67,195,135,148) 'pop.att.yahoo.com
' sock.RemotePort(995)
SmtpUnitTest
sock.RemoteIp(71,74,56,22) 'smtp-server.socal.rr.com
sock.RemotePort(25)
' sock.RemoteIp(98,139,221,42) 'smtp.att.yahoo.com
' sock.RemotePort(465)
Comments
I can telnet 71.74.56.68 110 and successfully connect using the POP3 unit test.
Print socket status to PST to see what going on in the socket.
Got pulled away for a few hours. Just tried your debug code with PopUnitTest and it showed Connected! So then I restored the app to original and now it's working? I can only guess there was a temporary connection problem (I've seen that before) when I tried it earlier.
As for SmtpUnitTest, it gets stuck at status $15 (Sock_Synsent) and eventually times out. I'm guessing it does the same at your end. I confirmed the Account Properties Port=25.
Now I'm thinking it may be an isp issue. I connect via att.com at home (where I am now) and socal.rr.com when I'm on the road. Turns out that when I'm connected via att.com I can't send e-mail from socal.rr.com but I can receive e-mail (which is why PopUnitTest works...now). So I knew the SmtpUnitTest wouldn't actually complete (i.e. can't send e-mail via socal.rr.com since I'm on att.com) but thought at least it could establish TCP connection. But now, based on the fact you can't connect with smtp-server.socal.rr.com either, I'm thinking att.com (and your isp?) may simply be refusing to forward the smtp request to socal.rr.com or the latter is ignoring it. I believe there's a way I can configure my att.com connection to fix that (i.e. allow me to send e-mail via socal.rr.com when I'm connected to att.com), so I'll pursue that. Thanks for your help, always points me in the right direction.
Anyway,
As for PopUnitTest it's connecting now but I noticed the output was garbled, think due to the fact my list of 500 messages >2KB. It was displaying part of the list, then displaying the rest later (i.e. after issuing RETR & QUIT). So I tweaked Send command as shown, seems to work correctly (i.e. displays entire >2KB response until bytesToRead==0 before issuing next command).
So if you want to connect to some mail server to send them mail you'll have to use port 465 or port 587, which are authenticating variants of SMTP port 25. Obviously you'll then also have to support things like SSL and TLS.
-Tor
Got me wondering what percentage of users have isps that, like att.net, require secured e-mail (i.e. SSL)?
So, how to send mail from your computer? If you don't want to pass everything through the ISP's server then you'll usually have to go the authenticated server route, and in practice that means you'll still have to pass mail through someone's server (i.e. you can't distribute mail directly to recipients, the way a corporate mailserver would). So, in my case, I have a gmail account, and I send all mail through gmail's server via port 465 (ssl) or port 587 (starttls), authenticating as myself (i.e. my gmail account). Not from any wiz or propeller though, just from my mobile- and desktop devices.
-Tor