Java 如何在tSendMail中发送文件内容
从几天开始,我就试着发一封邮件,里面有孩子的工作和父亲的工作的不同信息 见下面我的工作: 还有我的tRunJob_3 在这项工作结束时,我可以将tAggregateRow的信息放在电子邮件中,但它会发送几封电子邮件(一封邮件根据条件“如果”批准Java 如何在tSendMail中发送文件内容,java,email,talend,Java,Email,Talend,从几天开始,我就试着发一封邮件,里面有孩子的工作和父亲的工作的不同信息 见下面我的工作: 还有我的tRunJob_3 在这项工作结束时,我可以将tAggregateRow的信息放在电子邮件中,但它会发送几封电子邮件(一封邮件根据条件“如果”批准Denitjob---if---tRunJob_3) 由父作业中的tFileOutputDelimited_1生成的我的文件包含我需要放入最终邮件中的所有信息 1:如何在一封电子邮件中显示这些信息(无附件) 2:我的控制台中有此错误: For inp
Denitjob---if---tRunJob_3
)
由父作业中的tFileOutputDelimited_1生成的我的文件包含我需要放入最终邮件中的所有信息
1:如何在一封电子邮件中显示这些信息(无附件)
2:我的控制台中有此错误:
For input string: "7.91'7.91"
multiple points
这意味着什么
编辑: 通过下面的修改,它将向我发送一封包含收集到的信息的电子邮件 在my
tjavaflex
中:
代码首字母
// start part of your Java code
boolean loop ;
System.out.println("## START\n#");
代码负责人
// here is the main part of the component,
// a piece of code executed in the row
// loop
// code sample:
System.out.println("## LOAD...\n#");
if ((String)globalMap.get("message") != null) {
globalMap.put("message", (String)globalMap.get("message") + row5.mag + " qt: " + row5.qt + " p1: " + row5.p1 + "\n" ) ;
}
最终代码:
// end of the component, outside/closing the loop
loop = true ;
System.out.println("## END\n#");
在tjava
和tsendmail
但仍然有我的错误:
For input string: "7.91'7.91"
multiple points
最终文本字符串的大小可以有多大?您能否使用globalMap.put(“emailtext”,string_from_file)将文件数据附加到字符串中,然后使用此(字符串)globalMap.get(“emailtext”)作为电子邮件正文?我已经尝试过了,但问题是我不知道如何将
tfileinputdelimited
中的信息一行一行地放在globalmaptfileinputdelimited中,它将给出逐行输出,您可以在tJavaRow中读取并继续追加它。tFileInputDelimited-->tJavaRow和tJavaRow将您的代码作为globalMap.put(“yourstringvar”),(String)globalMap.get(“yourstringvar”)+input_row.schemacolumnname of tJavaRow..好的,谢谢。但它会发送几封电子邮件。我将tJavaRow链接到tsendmail,其中包含一行(main)否您必须使用onComponentOk或onSubJobOk