sending an email lazarus / 10-Designer ---------------------------------------------------------------------- cazzajay · 2009-11-15 16:12 I want to make a program that automatically sends an email to a pre- determined address, for the purposes of "reminding" the user to do something (the program will be a background process type program). Is there a straightforward way of doing this, without invoking the default email client on the machine (strictly speaking, it will be running on a central server in an enterprise network Win32) ---------------------------------------------------------------------- clauslack · 2009-11-15 17:45 An example for sending email with Indy. http://www.lazarus.freepascal.org/index.php/topic,7727.msg36648.html#m sg36648 Search in this forum and Wikis for more info about Indy, and other componets for send emails(Inet - http://wiki.lazarus.freepascal.org/lNet) Regards ---------------------------------------------------------------------- IndianaJones · 2009-11-15 21:13 Hi, I hope this code helps you. I use Indy 10 and Delphi but also should work with the FPC. (Components are: IdSMTPServer, IdMessage) If your SMTP server use authentication then you have to use IdSSLOpenSSL component too. Thanks.     Form1.SMTP.Host:='SMTP address of your mail server';     Form1.SMTP.Port:=25;     Form1.SMTP.AuthType:=satDefault; //    Form1.SMTP.AuthType:=satSASL; // if authentication is used.     Form1.MailMessage.From.Address := 'From Email Address';     Form1.MailMessage.Recipients.EMailAddresses := 'Recipient Mail Address';     Form1.MailMessage.Subject:='Subject';     Form1.MailMessage.Body.Text:='Body';   try     try     Form1.SMTP.Connect;     Application.processmessages;       Form1.SMTP.Send(Form1.MailMessage) ;     except on E:Exception do       ShowMessage('Sending Error');     end;   finally     if Form1.SMTP.Connected then Form1.SMTP.Disconnect;   end; ---------------------------------------------------------------------- cazzajay · 2009-11-17 23:42 I'm still an idiot - is there an idiot's guide to getting Indy to work on my Lazarus (win32) application? Thanks for everyone's help thus far! ---------------------------------------------------------------------- theo · 2009-11-18 09:46 Synapse has simple functions for this: SendTo and SendToEx http://synapse.ararat.cz/doc/help/smtpsend.html http://synapse.ararat.cz/