I'm trying to send email from my application using the following code:
Var
MailMessage : TIdMessage;
SMTP : TIdSMTP
.
.
.
//setup SMTP
SMTP.Host := 'smtp.gmail.com';
SMTP.Port := 25;
//setup mail message
MailMessage.From.Address := 'fromMe@gmail.com';
MailMessage.Recipients.EMailAddresses := 'ToSomeOne@hotmail.com';
MailMessage.Subject := 'Test';
MailMessage.Body.Text := 'Hello, It is Just for test';
SMTP.Connect;
SMTP.Send(MailMessage);
When i run it, it generates the following error
**ERROR: Must issue a STARTTLS command first. i29sm34080394wbp.22**
How can I solve this?