SMTPTEXT - Send Text or HTML Email Message from a Text File Member - is option 13 on the SMTP/400 main menu.
You can use SMTPTEXT with an RPG program to create a text or HTML message to embed in emails. With the 'text/plain' MIME type, you can send large text messages and embed email addresses and URLs. With the 'text/html' MIME type, you can create RAW HTML messages.  
To send a sample HTML message from the file SMTPMSGTST in the RJSSMTP library, use option 30 on the SMTP/400 main menu.


  • To Email Address - The email address where the message will be sent.
  • From Email Address - The email address of the person sending the email message. If the email bounces back, your email system delivers it to the From email address.
  • Subject - The subject of the email message.
  • From message text file name, Library, and Member - The iSeries file name for the message text file that the RPG program creates. This file can be created by a user program with a 512 data record length. DDS is not necessary to create the temporary message file.


  • Clear member after emailing - Whether to clear the message text file after it has been successfully emailed.
    • *NO -  Do not clear the file after mailing.
    • *YES - Clear the file after mailing.
  • SMTP Server Name - The SMTP server name or the TCP/IP address of the SMTP server where outgoing email will be forwarded. You can use any valid SMTP Server, such as the AS/400 SMTP Server, Domino for AS/400 SMTP Server, Microsoft Exchange, Novell Groupwise, and so on. If the AS/400 is the SMTP Server as well, enter LOCALHOST.
  • Mime content type - The mime content type for the email message. The mime content type tells the destination email server what type of message is coming in. While any mime content type is valid, the following two values are most common:
    • text/plain -  The email message contains plain text.
    • text/html - The email message contains HTML. 
Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case