Problem moving from 9 to 10

Giganews Newsgroups
Subject: Problem moving from 9 to 10
Posted by:  Bill (…
Date: Sat, 8 Jul 2006

I am moving a program that sends email from Indy 9/D7 to Indy 10/D2006.
I get the AuthenticationType error. I have read the information on page
171 of Indy in Depth but I do not understand it (my knowledge of Indy
is essentially zero). With Indy 9 I used the code below handle the
login by setting AuthenticationType to atLogin if the user indicated
that he/she must log in otherwise to atNone.

        SMTP.Host := gSMTPServer;
        SMTP.Port := gSMTPPort;
        SMTP.Username := gEmailUserName;
        SMTP.Password := gEmailPassword;
        if CompareText(gEmailAuthenticate, 'Yes') = 0 then
          SMTP.AuthenticationType := atLogin
          SMTP.AuthenticationType := atNone;

What must I do to move the if statement to Indy 10? Thanks.