Lazarus

Programming => Networking and Web Programming => Topic started by: egsuh on October 15, 2019, 08:37:17 am

Title: Problem in sending email
Post by: egsuh on October 15, 2019, 08:37:17 am
Hello,
I'm trying to send email using synapse.

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

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 abc@brio.co.kr, but not to  any other address like def@gmail.com.

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

Interesting thing is that I could send email to other addresses in the morning.
Title: Re: Problem in sending email
Post by: egsuh 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