115 pts.
 email from the as/400
i want to email a field (1000 char) from a file and put the text from the field in the body of the email. how do i do this?

Software/Hardware used:
ASKED: January 29, 2009  3:55 PM
UPDATED: June 10, 2009  2:49 PM

Answer Wiki:
If you have the native AS/400 email server up and working, you can use the SNDDST command like below. You could read your file using RPG or a CL and then issue this command in a CL program substituiting a variable in the LONGMSG parameter. SNDDST TYPE(*LMSG) + TOINTNET(('user@domain.com')) + DSTD('Subject') + LONGMSG('long message could go here using a variable name')
Last Wiki Answer Submitted:  January 30, 2009  3:23 pm  by  Willhud69   205 pts.
All Answer Wiki Contributors:  Willhud69   205 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

thanks, that is what i am going to do.

 115 pts.

 

Salutations!

AS400 email function is new to me and very much would like to use it.

I tried it using the following code from a test CLP, but received the an error message CPF9D03
“An Internet Address was specified in the TOINTNET parameter but there is no route SMTP gateway.”
What does this mean and how do I correct it? I know our AS400 sends emails using Sequel product.

SNDDST TYPE(*LMSG) TOINTNET((*NONE) +
(‘ALEX.BERNARDO@DHL.COM’ *PRI)) +
DSTD(‘SUBJECT LINE TEXT’) LONGMSG(‘LONG +
MESSAGE COULD GO HERE USING A VARIABLE NAME’)

Regards,
Alex Bernardo

Alex.bernardo@dhl.com

 80 pts.

 

Use the CHGSMTPA command to set up the IP address or name of the mail server you want to use.

Also see http://www.lmgtfy.com/?q=email+on+the+iseries for more information.

 5,830 pts.