Submitted by Kim Egekjaer on Sun, 01/31/2010 - 00:00
Forums

As you hopefully remember InterForm400 is able to send out e-mails with contents, that you can define as UTF-8 html files as mentioned in the technical tip of june 2009. However my collegue, Peter Soerensen pointed out to me, that images used in InterForm400 e.g. for this can be flexible. You could e.g. let the html file refer to an image on a web server and then let this image be setup by the marketing department, so it e.g. could be the offer of the week or whatever they want to tell the customers right now..

You can e.g. also insert a &&IMG command in spooled files so they refer to images in the IFS. And you can then ask the sales or markering department edit and save new versions of this image directly into the IFS. This opens up for a new way of using InterForm400: Insert totally dynamic images - not only based on the spooled file contents, but also based on the week or day when the spooled file was merged into either pdf or print.

Below I include the description in the technical tip of june 2009 of how to use html files with InterForm400. (You can use an html file with the mrgsplfpdf, sndmail and sndemail commands and of course also with the e-mail finishing defintion).

 

Using html files for e-mail contents (technical tip of june 2009 - http://www.system-method.com/node/629)
As you may know it has now been possible to include an html file as the e-mail content in InterForm400. Not only is it possible to include html (givning you freedom to format the e-mail freely), but you can also let the html file refer to an image on the web and even substitute variables.

To illustrate the possibilities use this html file - click here. If you open it you can see that it is using both functions described above. If you want to actully test it you can e.g. place the file in the IFS in /apf3812home/work and then run this command:

APF3812/SNDMAIL TOADR('receiver@receiverdomain.com' 'Your Name')

SUBJECT('Html Demo in InterForm400')

MSG(*stmf) MSGSTMF('/apf3812home/work/interword.html')

MSGVARS('Mr. X') FROMADR('sender@mydomain.com')

The command above is a simple command that is using the html functionality. Please notice, that the first variable in MSGVARS will substitute any use of *V1 in the html file, the second will substitute *V2 and so on. (In the html file I have included 'Dear *V1' in the top). See html file here.
 

In the e-mail finishing definition you would do this:

-------------------------------------------------------------------------------
          Create email / fax cover page text                           MAI345D 

 Definition name  . . . . :   E-MAILKSE                                       

 Description  . . . . . . :   kse                                              

 Text version . . . . . . .   HTML                                             

 Description  . . . . . . .   HTML Demo                                        

 Subject  . . . . . . . . .   HTML Demo                                        

 Text and -format . . . . .   X        T=Text, H=HTML, R=Raw HTML, X=External  


 HTML stream file . . . . .   /apf3812home/work/interword.html                 

  
 PDF-file name  . . . . . .   file.pdf                                         

 Fax cover page overlay . :   *NONE         Name, *NONE      F4=Prompt         

   File set . . . . . . . .                                                    

 F3=Exit   F4=Prompt   F12=Cancel                                              
-------------------------------------------------------------------------------

I hope this will help you to create even nicer e-mails with InterForm400.