Good Morning!

I am having trouble figuring how to satisfy Yahoo mail's Authentication.

I have tried several things, including this, but I still get the
authorization failed (#5.7.0)" response.

Does someone know how to authenticate with Yahoo?

procedure TForm1.SendYahooEmail(const toAddress, subject, body: String;
const attachment: String = '');
begin
   idslhndlrscktpnsl1.Destination := 'smtp.mail.yahoo.com:465';
   idslhndlrscktpnsl1.Host := 'smtp.mail.yahoo.com';
   idslhndlrscktpnsl1.Port := 465;
   idslhndlrscktpnsl1.DefaultPort := 0;
   idslhndlrscktpnsl1.SSLOptions.Method := sslvTLSv1;
   idslhndlrscktpnsl1.SSLOptions.Mode := sslmUnassigned;
   idslhndlrscktpnsl1.SSLOptions.VerifyMode := [];
   idslhndlrscktpnsl1.SSLOptions.VerifyDepth := 0;

   idsmtp2.Host := 'smtp.mail.yahoo.com';
   idsmtp2.Port := 465;
   idsmtp2.Username := edtUsername.Text;// + '@yahoo.com';
   idsmtp2.Password := edtYahooPW.Text;
   idsmtp2.AuthType := satDefault;
   idsmtp2.UseTLS := utUseImplicitTLS;
   try
     idsmtp2.Connect;
     idmsg1.From.Address := edtUserName.Text + '@yahoo.com';

     IdMsg1.Recipients.EMailAddresses := toAddress;

     IdMsg1.Subject := Subject;
     IdMsg1.Body.Text := body;

     IdSMTP2.Send(IdMsg1);
   finally
     idsmtp2.Disconnect;
   end;
end;


Thanks...Dan'l

Reply via email to