f



sending mail using Unix mail program from Sicstus Prolog

Forgive me if this is a newbie question.

I am looking for a simple way to send email using sicstus prolog. The
closest thing that i have found to a solution is using system() to
access the Unix mail command. The problem that i am having is coming up
with a way to specify the command in a dynamic way. I need to pass
system() an atom, if i am not mistaken, but i don't know how to do it.

I am looking for something like:

mail(Subject, Recipient, Body) :- system('mail -s Subject Recipient
<Body'),!.

So, my question is, how do i generate the command to pass to system?

Sincerely,

John

0
John
12/13/2005 2:02:26 PM
comp.lang.prolog 3728 articles. 0 followers. Post Follow

1 Replies
838 Views

Similar Articles

[PageSpeed] 52

John Dixon wrote:
> Forgive me if this is a newbie question.
> 
> I am looking for a simple way to send email using sicstus prolog. The
> closest thing that i have found to a solution is using system() to
> access the Unix mail command. The problem that i am having is coming up
> with a way to specify the command in a dynamic way. I need to pass
> system() an atom, if i am not mistaken, but i don't know how to do it.
> 
> I am looking for something like:
> 
> mail(Subject, Recipient, Body) :- system('mail -s Subject Recipient
> <Body'),!.
> 
> So, my question is, how do i generate the command to pass to system?
> 
> Sincerely,
> 
> John
> 

Look for atom_concat/3 in the manual.

Cheers

Bart Demoen
0
Bart
12/13/2005 2:33:22 PM
Reply: