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!

Send a mail in RPGLE

Status
Not open for further replies.

UAMI

Programmer
Dec 10, 2003
28
PT
Hi again!

I want to send a mail to outlook in rpgle. Is it possible?

What must i do?
 
Well, there is an API, there should be mention of it in one of the previous threads. Or, you can use SNDDST *LMSG, or you can purchase a product that will send emails.

If you are really nuts, you can write an RPG interface for java mail.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
 
I experimented the SNDDST, but it doesn't funtion. It gives a message like this: " It was specified an internet address but there is no guiding, to the SMTP linking station, defined in the SMTPRTE parameterof the CHGDSTA."

This is the command i executed:
===> SNDDST TYPE(*LMSG) TOINTNET((xxx.yyy@name.PT *BCC)) DSTD('Hi')
LONGMSG('This is a test') SUBJECT('Hi')

I experimented the CHGdSTA, but i have user permissions to change. Now our system administrator is on vacations and i can't do nothing more until he comes back.




When he comes back i will continue with this and if i have new doubts i make a new thread.

 
You can also do it with a call to a JAVA class
Code:
D DQuote     s             1   Inz('''')
D E_Sender   s           100
D E_Address  s           100
D E_Title    s            50
D E_Body     s          1000

C                   Eval      Cmd_String = 'JAVA CLASS(Email) ' + 
C                                   'PARM('          + D_Quote  + 
C                                   %Trim(E_Sender)             + 
C                                   D_Quote + ' ' + D_Quote     + 
C                                   %Trim(E_Address)            + 
C                                   D_Quote + ' ' + D_Quote     + 
C                                   %Trim(E_Title)              + 
C                                   D_Quote + ' ' + D_Quote     + 
C                                   %Trim(E_Body)               + 
C                                   D_Quote + ') '              + 
C                                   'CLASSPATH(' + D_Quote      + 
C                                     %TRIM(EMLPTH) +             
C                                   D_Quote + ') '                
C                   Eval      Cmd_Length = %Len(%Trim(Cmd_String))
C                   Call  (E) 'QCMDEXC'                           
C                   Parm                    Cmd_String            
C                   Parm                    Cmd_Length
I worked well for me. I can't remember the value of the CLASSPATH parameter but there is info about it on


PeteJ
(Contract Code-monkey)

It's amazing how many ways there are to skin a cat
(apologies to the veggies)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top