Merry Christmas All, thanks in advance for your help.
I am trying to use QtmmSendMail in an RPG program. The emails are not being sent.
The QMSF joblog shows: Message ID : TCP9676, Cause . . . . . : SMTP message forwarding was stopped because bad data was detected in NO EOH CRLFCRLF.
I am building a physical file in the rpg program then copying to the IFS using CPYTOIMPF: CPYTOIMPF FROMFILE(EMAIL) TOSTMF('/temp/mimefile.txt') MBROPT(*REPLACE) STMFCODPAG(*PCASCII) RCDDLM(*CRLF) DTAFMT(*FIXED)
The IFS file looks like this:
From: "Me" <john@john.com>
To: "You" <john@john.com>
Subject: HTML Based Email from the iSeries
Date: 12/17/2020
Mime-Version: 1.0
Content-Type: Text/HTML; charset=US-ASCII
CRLF
<HTML><BODY>
<table><tr><TD A HREF="http://www.as400.ibm.com">
<img src="http://www-1.ibm.com/servers/eserver/iseries/hardware/graphics/
iseries_family.jpg">
</td><td><FONT SIZE=5>
HTML formatted Email <br>from the iSeries
</font></td></tr></table><br>
<TABLE BORDER><TR>
<TD BGCOLOR="#00ffff" align="center">ORDER NUMBER</TD>
<TD BGCOLOR="#00ffff" align="center">CUSTOMER</TD>
<TD BGCOLOR="#00ffff" align="center">SHIP DATE</TD>
<TD BGCOLOR="#00ffff" align="center">ORDER VALUE</TD>
</TR>
<TR><TD ALIGN="Left">M465043</TD>
<TD ALIGN="Left">Roys Sandwich Shoppe</TD>
<TD ALIGN="Right">03/15/2004</TD>
<TD ALIGN="Right">1,245.55</TD></TR>
<TR><TD ALIGN="Left">M464657</TD>
<TD ALIGN="Left">That Sub Place</TD>
<TD ALIGN="Right">03/19/2004</TD>
<TD ALIGN="Right">1,455.85</TD></TR>
<TR><TD ALIGN="Left">M557890</TD>
<TD ALIGN="Left">Harrys House of Hoagies</TD>
<TD ALIGN="Right">03/22/2004</TD>
<TD ALIGN="Right">6,685.55</TD></TR>
</TABLE>
<P>END OF REPORT
</body></HTML>
From what I understand, the CRLF between the header and body should be on a line all by itself. It looks like it is to me. I have tried both CRLF and CRLFCRLF. Anyone see what I'm missing?
I am trying to use QtmmSendMail in an RPG program. The emails are not being sent.
The QMSF joblog shows: Message ID : TCP9676, Cause . . . . . : SMTP message forwarding was stopped because bad data was detected in NO EOH CRLFCRLF.
I am building a physical file in the rpg program then copying to the IFS using CPYTOIMPF: CPYTOIMPF FROMFILE(EMAIL) TOSTMF('/temp/mimefile.txt') MBROPT(*REPLACE) STMFCODPAG(*PCASCII) RCDDLM(*CRLF) DTAFMT(*FIXED)
The IFS file looks like this:
From: "Me" <john@john.com>
To: "You" <john@john.com>
Subject: HTML Based Email from the iSeries
Date: 12/17/2020
Mime-Version: 1.0
Content-Type: Text/HTML; charset=US-ASCII
CRLF
<HTML><BODY>
<table><tr><TD A HREF="http://www.as400.ibm.com">
<img src="http://www-1.ibm.com/servers/eserver/iseries/hardware/graphics/
iseries_family.jpg">
</td><td><FONT SIZE=5>
HTML formatted Email <br>from the iSeries
</font></td></tr></table><br>
<TABLE BORDER><TR>
<TD BGCOLOR="#00ffff" align="center">ORDER NUMBER</TD>
<TD BGCOLOR="#00ffff" align="center">CUSTOMER</TD>
<TD BGCOLOR="#00ffff" align="center">SHIP DATE</TD>
<TD BGCOLOR="#00ffff" align="center">ORDER VALUE</TD>
</TR>
<TR><TD ALIGN="Left">M465043</TD>
<TD ALIGN="Left">Roys Sandwich Shoppe</TD>
<TD ALIGN="Right">03/15/2004</TD>
<TD ALIGN="Right">1,245.55</TD></TR>
<TR><TD ALIGN="Left">M464657</TD>
<TD ALIGN="Left">That Sub Place</TD>
<TD ALIGN="Right">03/19/2004</TD>
<TD ALIGN="Right">1,455.85</TD></TR>
<TR><TD ALIGN="Left">M557890</TD>
<TD ALIGN="Left">Harrys House of Hoagies</TD>
<TD ALIGN="Right">03/22/2004</TD>
<TD ALIGN="Right">6,685.55</TD></TR>
</TABLE>
<P>END OF REPORT
</body></HTML>
From what I understand, the CRLF between the header and body should be on a line all by itself. It looks like it is to me. I have tried both CRLF and CRLFCRLF. Anyone see what I'm missing?
Comment