[Gambas-user] gambas and email

Rob Kudla sourceforge-raindog2 at ...94...
Wed Feb 22 22:13:19 CET 2006

On Wed February 22 2006 09:29, mike webb wrote:
> >The 'mail' command ?
> just tried that one, i did:
> mail -s "test message from sid" mwebb at ...1362...
> the server just sat there, after a while i pressed control-c
> and i got my prompt back.

It's meant to be used from other programs.  The following is 
pseudo-code to give you an idea of how I'd use it from Gambas.  
(Note: I don't think it's safe to assume that "mail" will be 
installed on any system or that it will know how to send 
Internet mail, so it may be safer just to open a socket to an 
SMTP server, assuming you can get the user's ISP's mail server 

myproc = Shell "mail -s \"test message from sid\" 
mwebb at ...1362..."

print #myproc, "This is the body of the mail\r\n"

close myproc

To simulate that behavior from the command line, when mail is 
just sitting there waiting for you to type control-C, type a few 
lines and then press control-D on a blank line to (try to) send 


More information about the User mailing list