SMTPTEXT CL Command Documentation - Support

SMTPTEXT CL Command Documentation

From Support

Jump to: navigation, search

SMTPTEXT - Send Text or HTML Email Message from a Text File Member

Description The SMTPTEXT command is used in conjunction with an RPG program to create a text or HTML message and email the message as an embedded text or HTML Message. The main purpose of this command is to allow users to send large text messages that can contain plain text as well as embedded URL information such as email addresses and web site locations when writing text to the message file from an RPG program and specifying 'text/plain' for the MIME type. RAW HTML messages can also be created with this command by writing HTML commands to the message file from the RPG program and specifying 'text/html' for the MIME type.

Use option 30 on the RJSSMTP menu to send a sample HTML message from file SMTPMSGTST in library RJSSMTP.

Command Parameters

To Email Address This parameter holds the To Email Address where the message will be sent.

From Email Address This parameter holds the From Email Address of the person sending the email message. If the email bounces back for any reason it should get automatically delivered back to the From Email Address by the mail system. This is dependent on your email system and its capabilities.

Subject This parameter holds the Subject of the email message.

From message text file name/library/member This parameter holds the AS/400 file name for the message text file created by the RPG program. This file can be created by a user program with a 512 data record length. DDS is not needed to create the temporary message file.

Example: CRTPF FILE(QTEMP/MESSAGE) RCDLEN(512)

Clear member after emailing This parameter tells the SMTPTEXT command to clear the message text file after it's successfully emailed from the AS/400 as a text or HTML message.

*NO -  Do not clear the file after mailing.
*YES - Clear the file after mailing.

SMTP Server Name This parameter holds the SMTP Server Name or the TCP/IP Address of the SMTP Server where outgoing email will be forwarded to. Any valid SMTP Server such as the AS/400 SMTP Server, Domino for AS/400 SMTP Server, MS Exchange, Novell Groupwise or other SMTP Server may be used. LOCALHOST can be entered if the AS/400 is the SMTP Server as well.

Mime content type This parameter tells the SMTPTEXT command the mime content type for the email message. Any mime content type is valid, however the following two values will typically be used. The mime content type tells a destination email server what type of message is coming in: text or HTML.

text/plain -  The email message contains plain text.
text/html - The email message contains HTML.
Personal tools