delphi 调用QQ邮箱发送邮件
发布时间:2020-12-15 09:51:55 所属栏目:大数据 来源:网络整理
导读:procedure TForm1.FormCreate(Sender: TObject);begin try IdSMTP1.AuthenticationType := atLogin; IdSMTP1.Host := ‘smtp.qq.com‘; IdSMTP1.Username := ‘[email?protected]‘; //qq邮箱 IdSMTP1.Password := ‘tjlhnnajvwrgbifca‘; //授权码 IdSMTP1.
procedure TForm1.FormCreate(Sender: TObject); begin try IdSMTP1.AuthenticationType := atLogin; IdSMTP1.Host := ‘smtp.qq.com‘; IdSMTP1.Username := ‘[email?protected]‘; //qq邮箱 IdSMTP1.Password := ‘tjlhnnajvwrgbifca‘; //授权码 IdSMTP1.Port := 25; IdSMTP1.Connect(3000); IdSMTP1.Authenticate; IdMessage1.Subject := ‘测试邮件‘; IdMessage1.From.Address := ‘[email?protected]‘; IdMessage1.Recipients.EMailAddresses := ‘[email?protected]‘; IdMessage1.Body.Text := ‘hello kkkkkkkkkkkkkk‘; IdSMTP1.Send(IdMessage1); except on e: Exception do ShowMessage(e.Message); end; end; win10 + delphi 7测试ok,不用管SSL。 本文发表于2019-03-17 11:45:08 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |