Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RUN map for mail adapter usage

Status
Not open for further replies.

jinkys

Programmer
Sep 11, 2003
67
GB
Hi all

I have an issue using the PUT function returning a zero code when a fail happens with the mail adapter so I've been told I need to use a RUN map to call adapter.
Can anyone explain how to use a RUN map to call the mail adapter. I need to read to, from and server names from a config file so i can't just hard code them to the command section of the output adapter card. How do I pass these inputs to the mail adapter?

=VALID(PUT("EMAIL", "-PROTO INET -SERVER '"+MAILSERVER:Out+"' -FROM '"+MAILFROM:Out+"' -TO '"+MAILTO:Out+"' -SUB 'Subject of message' -TV", Input), FAIL("EMAIL"))
 
You have your map to use the email adapter which reads in your config file and you run the map from another map using the valid(run(mailmap)fail()). This way, when the RUN map completes, it will fail and will report the
correct error information to the top level map, which can then fail based on this return code.
 
Hi Janhes

I understand that bit, it was more how you pass the variables (to, from and server) from my example into the mail adapter command line from the run command? if you select the target as email on the output card settings how do you pass the input paramters from file to command?
 
The map which calls the email adapter can still read in the config file.
 
If there is more than one e-mail to be sent, call it from a functional map and just pass the variables from the input card to the e-mail output over-ride.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top