How to send a email in Informix 4gl How to send a email in Informix 4gl numericInteger (Programmer) (OP) 4 Jul 07 20:15 Hi all! I would like to send an email to customer by using Informix 4gl. Is that possible?? Any sample code to guide me? Thank youregards,Newbies. RE: How to send a email in Informix 4gl olded (Programmer) 6 Jul 07 00:45 I'm assuming that you are executing Informix 4GL from a Unix/Linux system and you want to send email from the Unix system to your customer from within an Informix 4GL program. While Informix 4GL can execute any valid unix command - including mailx or mail - Informix 4GL doesn't contain mail transfer capability. For that, you have to use a mail transfer program such as the Unix/Linux sendmail program. Whatever transfer program you use, it must be setup first before email can be transferred with Informix 4GL.If the unix mail or mailx commands now work from the command line, they can be called from Informix 4GL.Assume your email is contained in ASCII file myfile, this command sends the contents to user eds@myserver:CODEmaindefine mystring char(40)let mystring = "mailx eds@myserver < myfile"run mystringend mainThe above code works, but it's clumsy to build the ASCII file.In this FAQ:FAQ179-2007: How can Informix 4GL interact with Unix?I presented "C" functions callable by Informix 4GL. This opens a pipe to the mailx command that allows writing strings to the pipe. When the pipe closes, the strings are emailed:CODEmaindefine xx smallint, sstd char(80)whenever error continuelet xx = rx_shopenw("mailx eds@myserver", 0) #open a valid unix commandlet xx = rx_shwrite("send line 1", 0) # write to the pipelet xx = rx_shwrite("send line 2", 0)call rx_shclose(0) #be sure to close the pipeend mainThe FAQ shows you how to set up the "C" functons used in the above code. Let me know if you have any questions.