发送邮件,用smtpclient发送发现不支持ssl的465端口,改用CDO.Message可以发送,服务器地址使用域名可以发送成功,但把服务器地址换成IP地址就报与服务器的传输连接失败,但用outlook、foxmail这些邮件客户端用IP地址和域名都可以发送,各位有没有碰到过的,怎么解决?谢谢大家了
`
CDO.Message oMsg = new CDO.Message();
Configuration conf = new ConfigurationClass();
conf.Fields[CdoConfiguration.cdoSendUsingMethod].Value = CdoSendUsing.cdoSendUsingPort;
conf.Fields[CdoConfiguration.cdoSMTPAuthenticate].Value = CdoProtocolsAuthentication.cdoBasic;
conf.Fields[CdoConfiguration.cdoSMTPUseSSL].Value = true;
conf.Fields[CdoConfiguration.cdoSMTPServer].Value = this.Host;
conf.Fields[CdoConfiguration.cdoSMTPServerPort].Value = this.Port;
conf.Fields[CdoConfiguration.cdoSendEmailAddress].Value = "";
conf.Fields[CdoConfiguration.cdoSendUserName].Value = this.From;
conf.Fields[CdoConfiguration.cdoSendPassword].Value = this.Password;
conf.Fields.Update();
oMsg.Configuration = conf;
oMsg.HTMLBody = this.Body;
oMsg.Subject = this.Subject;
oMsg.From = this.From;
oMsg.To = this.To;
oMsg.Send();`