现在基本上邮件服务器停用了SMTP和POP3,总算发现GMAIL可以,但是用outlook之类的软件可以接受,自己编写的代码总是报错.
try
    //----建立pop3连接----//    if POP.Connected then
    begin
      POP.Disconnect;
    end;
    POP.Host := string(getPopServer());//imap.gmail.com
    POP.Port := getPopPort(); //995
    userName:=string(getmailLogin());  //[email protected]
    password:= string(getPassword());  //xxxx
    POP.Username := userName;
    POP.Password := password;
    POP.Connect;//此处无法连接
  except
    .......
  end;