On mardi 15 juillet 2008, Nx GT-R BOY wrote: > Hi, As part of my development in Gambas2 I am making a feature in my > software that remains people a to-do list daily via email. > > So far I am working with sendmail, but If you know a better alternative > would be appreciated. > > At shell I do: > sendmail [EMAIL PROTECTED] > From: [EMAIL PROTECTED] > Subject: To-do list remind > Remember to pickup some things at 2:00pm > CTRL+D > > I cant find a way to use sendmail in a single line, I think must be all in > different lines, so, How do I execute this from gambas (different lines?)?, > Do you think that write in real time a script and then call it from gambas > could be the best (optimum?) option? > > And the most important thing, How do I send a CTRL+D to the shell, without > it, the mail wont be send. > > Thanks in advance.
First, run sendmail from your program: hProcess = SHELL "sendmail" FOR INPUT OUTPUT Then, to send something to sendmail, just PRINT to it: PRINT #hProcess, "First Line" PRINT #hProcess, "Second Line" ... To send what is usually named "CTRL+D", just close the stream. CLOSE #hProcess Regards, -- Benoit Minisini ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user