title: STARTTLS error while sending email using Indy in Delphi XE
body: <p>I'm trying to send email from my application using the following code:</p>
  
  <pre><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);
  </code></pre>
  
  <p>When i run it, it generates the following error</p>
  
  <pre><code>**ERROR: Must issue a STARTTLS command first. i29sm34080394wbp.22**
  </code></pre>
  
  <p>How can I solve this?</p>