Leonel,
Hi, good day to you.
I've not needed to do this for a while, the below should work.
Set SMTP attributes
CHGSMTPA RTYDAY(0 0) RTYHOUR(0 0) MAILROUTER(your-SMTP-router-here) FIREWALL(*YES) DIALSCD(*NO)
Add Distribution Directory Entry
ADDDIRE USRID(INTERNET SMTPRTE) USRD('SMTP routing of Emails') SYSNAME(INTERNET) NETUSRID(*USRID) PREFADR(NETUSRID *IBM ATCONTXT)
Change Distribution Attributes
CHGDSTA SMTPRTE(INTERNET SMTPRTE)
Stop/Start *SMTP
ENDTCPSVR SERVER(*SMTP)
STRTCPSVR SERVER(*SMTP)
Send test message
SNDSMTPEMM RCP((your-Email-address-here)) SUBJECT('Subject line here') NOTE('Note here')
NOTE
You may wish to post your IBMi queries/questions in https://community.ibm.com/community/user/power/communities/ibmi-home
Regards, Steve
------------------------------
Steve Munday
AIX, IBM i, HMC, PowerVM
------------------------------