Author Topic: Problem in sending email  (Read 845 times)


  • Sr. Member
  • ****
  • Posts: 384
Problem in sending email
« on: October 15, 2019, 08:37:17 am »
I'm trying to send email using synapse.

Code: Pascal  [Select][+][-]
  1. procedure TEmailForm.Button1Click(Sender: TObject);
  2. begin
  3.      if SendTo('', leTo.Text,
  4.                 leSubject.Text,
  5.                 '',
  6.                 Memo1.Lines)
  7.      then ShowMessage('Mail Sent')
  8.      else ShowMessage('Failed');
  9. end;

leTo.Text is the recipients' addresses. The mail is sent only when the domain of recipients are the same as that of sender. so I can send email to, but not to  any other address like

Any possible reason? It may be not the problem of Lazarus or Synapse. Instead it may come from mail server (in this case 

Interesting thing is that I could send email to other addresses in the morning.


  • Sr. Member
  • ****
  • Posts: 384
Re: Problem in sending email
« Reply #1 on: October 15, 2019, 08:54:55 am »
I think I found the reason --- some mail servers require SMTP authentification. So I have to use SendToEx instead of SendTo.


TinyPortal © 2005-2018