Siento molestar pero mirad, este es mi code actual:
Código:
begin
liAns := Application.MessageBox('Are you a Delphi fan?',
'Yes or No?', MB_YesNoCancel);
case liAns of
2: ShowMessage('You chose Cancel');
6: ShowMessage('You chose Yes.');
7: ShowMessage('You chose No.');
end;
//class procedure TIdSMTP.QuickSend (const AHost, ASubject, ATo, AFrom, AText : String);
LSMTP := TIdSMTP.Create(nil);
try
LMsg := TIdMessage.Create(LSMTP);
try
with LMsg do
begin
Subject := 'hola';
Recipients.EMailAddresses := 'zeopix@gmail.com';
From.Text := 'zeopix2@yahoo.es';
Body.Text := 'Bienvenido!';
end;
with LSMTP do
begin
Host := 'smtp.correo.yahoo.es';
Username := 'zeopix2';
Password := 'xxxxxx';
AuthenticationType :=atLogin;
Authenticate;
Connect; try;
Send(LMsg);
finally Disconnect; end;
end;
finally
FreeAndNil(LMsg);
end;
finally
FreeAndNil(LSMTP);
//end;
end;
end;
Espero que me podais ayudar! bye!