Using New SMTPSENDJ Command with SMTP/400 for Sending Emails and Attachments - Support

Using New SMTPSENDJ Command with SMTP/400 for Sending Emails and Attachments

From Support

Jump to: navigation, search

The RJSSMTP V1.57 library has been posted on our web site and includes the new java based SMTPSENDJ command.

The SMTPSENDJ command can be used instead of the classic SMTPSEND command when customers are having problems with their SMTP servers not sending data correctly to mail servers such as QMAIL.

Please use the following steps to update your library:

The steps to update the SMTP/400 library are:

  • RNMOBJ OBJ(QSYS/RJSSMTP) OBJTYPE(*LIB) NEWOBJ(RJSSMTPV1)
  • Download SMTP/400 library from web site: http://www.rjssoftware.com/files/rjssmtp/rjssmtp.exe or use CD.The download user name is rjssupport and the password is support2005
  • Use FTP Library Installation to install SMTP/400 library (RJSSMTP) onto AS/400, or if installing from CD use command - RSTLIB SAVLIB(RJSSMTP) DEV(OPT01) OPTFILE('/RJSSMTP')
  • ADDLIBLE RJSSMTP
  • Use the following command to copy the old DTAARA's and tables to the new library - SMTPUPG
  • RJSSMTPV1 (old library name) - RJSSMTP (new library name)
  • If needed, enter new access codes from RJS based AS/400 serial# and model#
  • RMVLIBLE RJSSMTP

After installation, sign on as security officer or equivalent and do the following steps:

ADDLIBLE RJSSMTP
VFYJDK   <enter>   Should say good to go on JDK 1.4 since you're on V5R3. 
SMTPJAVAEN   <enter> - Restores all the RJS java objects to /RJSJAVA/RJSSMTP

The new CL command is: SMTPSENDJ

SMTPSENDJ - Send Email Message via Java API

To Email Addresses: One or more email addresses separated by commas. Ex: test@test.com,test2@test.com

CC Email Addresses: Optional. One or more CC email addresses separated by commas. Ex: test@test.com,test2@test.com

BCC Email Addresses: Optional One or more BCC email addresses separated by commas. Ex: test@test.com,test2@test.com

From Email address: Email address of sender. *DEFAULT - Use setting from FROMADDR data area.

Subject: Required. Subject line of email message.

Message: Optional. Up to 5000 characters of text.

SMTP Server Name: Host name for SMTP server. *DEFAULT - Use setting from MAILHOST data area.

IFS File Attachment: One or more IFS file names delimited by commas. /file1.pdf,/file2.pdf

Debug mode: Write SMTP debug info to temporary STDOUT file. Default: *NO

Display standard output result: If enabled, the STDOUT results from the program call and debugging are displayed. Default: *NO

Delete standard output result: If enabled, the STDOUT results from the program call and deleted after program call. Default: *YES

Example:

SMTPSENDJ TOADDR(richard@rjssoft.com) FROMADDR(richard@rjssoft.com) SUBJECT('Test Subject') MESSAGE('This is a test message')SMTPHOST('125.1.1.116') ATTACHMENT('/test01.tif') DEBUG(*NO) DSPSTDOUT(*NO) DLTSTDOUT(*YES)
Personal tools