L
LearningAug
Unregistered / Unconfirmed
GUEST, unregistred user!
我的代码如下:
IdSSLIOHandlerSocketOpenSSL := TIdSSLIOHandlerSocketOpenSSL.Create(Self);
IdSSLIOHandlerSocketOpenSSL.DefaultPort := 0;
IdSSLIOHandlerSocketOpenSSL.SSLOptions.Mode := sslmUnassigned;
IdSSLIOHandlerSocketOpenSSL.SSLOptions.VerifyDepth := 0;
IdSSLIOHandlerSocketOpenSSL.SSLOptions.VerifyMode := [];
IdSSLIOHandlerSocketOpenSSL.Host := IdSMTP1.Host;
IdSSLIOHandlerSocketOpenSSL.Port := IdSMTP1.Port;
IdSSLIOHandlerSocketOpenSSL.SSLOptions.Method := sslvSSLv1;
IdSMTP1.IOHandler := IdSSLIOHandlerSocketOpenSSL;
IdSMTP1.UseTLS := utUseImplicitTLS;
然后我把libeay32.dll和ssleay32.dll这两个DLL都放到了我的应用程序的根目录下,为什么当我把IdSMTP1.Host设置为:smtp.gmail.com的时候,然后再发送邮件,总是报错:'Must issue a STARTTLS command first'。
可是如果我把IdSMTP1.Host设置为163或者tom和sina的都没有任何问题,可以发送成功,请问各位大侠,对于GMail的邮件服务器,我应该怎么设置呢?先谢谢了哈!
IdSSLIOHandlerSocketOpenSSL := TIdSSLIOHandlerSocketOpenSSL.Create(Self);
IdSSLIOHandlerSocketOpenSSL.DefaultPort := 0;
IdSSLIOHandlerSocketOpenSSL.SSLOptions.Mode := sslmUnassigned;
IdSSLIOHandlerSocketOpenSSL.SSLOptions.VerifyDepth := 0;
IdSSLIOHandlerSocketOpenSSL.SSLOptions.VerifyMode := [];
IdSSLIOHandlerSocketOpenSSL.Host := IdSMTP1.Host;
IdSSLIOHandlerSocketOpenSSL.Port := IdSMTP1.Port;
IdSSLIOHandlerSocketOpenSSL.SSLOptions.Method := sslvSSLv1;
IdSMTP1.IOHandler := IdSSLIOHandlerSocketOpenSSL;
IdSMTP1.UseTLS := utUseImplicitTLS;
然后我把libeay32.dll和ssleay32.dll这两个DLL都放到了我的应用程序的根目录下,为什么当我把IdSMTP1.Host设置为:smtp.gmail.com的时候,然后再发送邮件,总是报错:'Must issue a STARTTLS command first'。
可是如果我把IdSMTP1.Host设置为163或者tom和sina的都没有任何问题,可以发送成功,请问各位大侠,对于GMail的邮件服务器,我应该怎么设置呢?先谢谢了哈!