Synapse SendMail problem lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- codeman · 2015-02-22 19:51 Hello, Im trying to send an email using Synapse, but it does not getting connected.. Can u try it to tell me whats wrong? Code: [Select]function SynapseSendMail(User, Password, MailFrom, MailTo, SMTPHost, SMTPPort: string; MailData: string   ): Boolean; var   SMTP: TSmtpSend;   sl:TStringList; begin   Result:=False;   SMTP:=TSMTPSend.Create;   sl:=TStringList.Create;   try     sl.text:=Maildata;     SMTP.UserName:=User;     SMTP.Password:=Password;     SMTP.TargetHost:=SMTPHost;     SMTP.TargetPort:=SMTPPort;     SMTP.AutoTLS:=true;     if SMTPPort<> '25' then       SMTP.FullSSL:=true;     if SMTP.Login then     begin         ShowMessage('Logined');       result:=SMTP.MailFrom(MailFrom, Length(MailData)) and          SMTP.MailTo(MailTo) and          SMTP.MailData(sl);       SMTP.Logout;     end;   finally     SMTP.Free;     sl.Free;   end; end; procedure TForm1.Button2Click(Sender: TObject); begin     if (SynapseSendMail('mymai@yahoo.com','mypassw','mymail@yahoo.com' ,'mymail@yahoo.com','smtp.yahoo.com', '25 or 465 or 587', 'msg')) then      ShowMessage('Sent'); end; ---------------------------------------------------------------------- Gizmo · 2015-02-22 22:30 http://forum.lazarus.freepascal.org/index.php/topic,27222.msg168067.ht ml#msg168067