[fpc-pascal]Free Pascal librares for e-mail
mazay at phone.dn.ua
Fri May 17 19:00:56 CEST 2002
John Coppens wrote:
> Hi Cyril,
> I think the easiest way to send e-mail, is to directly call the unix sendmail program
> through an exec call. On one line you can include destination address, subject
> and body. Or you can prepare a simple file with the message data inside, and
> then call sendmail with exec.
I try to use this method but havent success: send
[mazay at warp tesing]$ cat 111.tmp
From: test at phone.dn.ua
X-X-Sender: root at phone.dn.ua
To: Cyril Zlachevsky <mazay at phone.dn.ua>
Reply-To: Cyril Zlachevsky <mazay at phone.dn.ua>
Organization: Don-Link ITSP
[mazay at warp tesing]$ cat mailproc.pp
Exec('/usr/sbin/sendmail.postfix','-U mazay at phone.dn.ua < 111.tmp');
[mazay at warp tesing]$ ppc386 mailproc.pp
Free Pascal Compiler version 1.0.4 [2001/11/16] for i386
Copyright (c) 1993-2000 by Florian Klaempfl
Target OS: Linux for i386
3 Lines compiled, 0.0 sec
[mazay at warp tesing]$./mailproc
and after launch mailproc, only pressing '.' or Ctrl-Break can stop
[mazay at warp tesing]$ps ax
10239 pts/1 S 0:00 ./mailproc
10240 pts/1 S 0:00 /usr/sbin/sendmail.postfix -U
mazay at phone.dn.ua < 111.tmp
10241 pts/1 S 0:00 /usr/sbin/postdrop -r
Any ideas? Maybe I'm going wrong way?
> On Fri, 17 May 2002 17:37:59 +0300 (EEST)
> Cyril Zlachevsky <mazay at phone.dn.ua> wrote:
>>I need send e-mail messages from pascal program (in linux).
>>But can't find any procedure or funtion for mailing in Free Pascal.
>>How I can solve my problem in fpc for linux?
More information about the fpc-pascal