Page 1 of 1

Message cutoff in Send Email Task.

Posted: Tue Aug 08, 2017 2:09 pm
by rarogerson
I am trying to send an email from a program using RunProject2. When I populate the variable message_name and pass it to RunProject2 the message is being cut off (it looks like at 256) when I receive the email.

I created a test project and populated the value for the variable message with the contents of message_name in my program just before calling RunProject2. The email is sent correctly.
Here is the test project
Code: Select all
<project name="test HTML in e-mail" mainModule="Main" version="2.0">

	<module name="Main">

		<sendEmail resourceId="mail server" toList="[email protected]" version="2.0">
			<from address="[email protected]" />
			<subject>
				<![CDATA[test HTML]]>
			</subject>
			<message contentType="text/HTML">
				<![CDATA[${Message}]]>
			</message>
		</sendEmail>

	</module>

	<variable name="Message" value="<div style="font-size:14; ">   tran_type: E.APPT import id: 3134 Whse: 97</br></br></br>    PO#: 631276 PO not found for child record.;</br></br>   Useful SQLs for more detail</br>   select * from qs36f.weappt where import_id = 471759;</br>   select * from qs36f.weapptpo where import_id = 471759;</br>   select * from qs36f.wiecntrl where import_id = 471759</div>" />
</project>


and here is the code for the actual project
Code: Select all
<project name="Email_WMS_Error" mainModule="Main" version="2.0">
	<description>Email an error from the new WMS system to a list of email addresses from EMAILDP</description>

	<module name="Main">

		<sql label="Get Email Addresses" resourceId="Comanche" version="1.0">
			<query label="EMAILDP " outputVariable="emaildp">
				<statement>select edaddr  
from hjbase.emaildp
where edrptn = ${ReportName}

 </statement>
			</query>
		</sql>

		<forEachLoop itemsVariable="${emaildp}" currentItemVariable="EmailAddr">

			<sendEmail resourceId="mail server" toList="${emaildp["edaddr"]}" version="2.0" onError="continue">
				<from address="${FromAddress}" />
				<subject>
					<![CDATA[${Subject}]]>
				</subject>
				<message contentType="text/HTML">
					<![CDATA[${Message}]]>
				</message>
			</sendEmail>

		</forEachLoop>
	</module>

	<variable name="ReportName" value="&apos;WMS_ERROR&apos;" description="Report name key for EMAILDP" />
	<variable name="Subject" value="Test subject line" />
	<variable name="Message" value="Error Message test" />
	<variable name="FromAddress" value="[email protected]" />
</project>
Is there any restrictions on the length of the variable or the message?

Thanks,
Rob

Re: Message cutoff in Send Email Task.

Posted: Mon Aug 28, 2017 11:31 am
by Support_Wayne
Rob,

There was a bug in RunProject2. It was corrected in later versions, RunProject3 and later.