hello
I have the exact same error while using tSendMail in TOS 3.0.2
the same component is working fine on TOS 2.3.3 with same arguments
isn't there a bug with this tSendmail component in TOS 3.0.2 ?
Starting job Prepa_GASPAR at 11:11 28/05/2009.
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on token "(", Expression expected after this token
Syntax error on token "(", Expression expected after this token
Syntax error on token "(", Expression expected after this token
Syntax error on token "(", Expression expected after this token
at edifice_gaspar.prepa_gaspar_0_1.Prepa_GASPAR.tSendMail_2Process(Prepa_GASPAR.java:2217)
at edifice_gaspar.prepa_gaspar_0_1.Prepa_GASPAR.tMSSqlInput_1Process(Prepa_GASPAR.java:1987)
at edifice_gaspar.prepa_gaspar_0_1.Prepa_GASPAR.tFileCopy_1Process(Prepa_GASPAR.java:372)
at edifice_gaspar.prepa_gaspar_0_1.Prepa_GASPAR.runJobInTOS(Prepa_GASPAR.java:3085)
at edifice_gaspar.prepa_gaspar_0_1.Prepa_GASPAR.main(Prepa_GASPAR.java:2974)
Job Prepa_GASPAR ended at 11:11 28/05/2009.
code is :
start
*/
currentComponent="tSendMail_2";
String message_tSendMail_2 = (("Hello")==null || "".equals("Hello"))?"\"\""
"Hello") ;
java.util.Properties props_tSendMail_2 = System.getProperties();
props_tSendMail_2.put("mail.smtp.host", smtpHost_tSendMail_2);
props_tSendMail_2.put("mail.smtp.port", smtpPort_tSendMail_2);
props_tSendMail_2.put("mail.smtp.auth", "false");
javax.mail.Session session_tSendMail_2 = javax.mail.Session.getInstance(props_tSendMail_2, null);
javax.mail.Message msg_tSendMail_2 = new javax.mail.internet.MimeMessage(session_tSendMail_2);
msg_tSendMail_2.setFrom(new javax.mail.internet.InternetAddress(from_tSendMail_2));
msg_tSendMail_2.setRecipients(javax.mail.Message.RecipientType.TO,javax.mail.internet.InternetAddress.parse(to_tSendMail_2, false));
if(cc_tSendMail_2!=null) msg_tSendMail_2.setRecipients(javax.mail.Message.RecipientType.CC, javax.mail.internet.InternetAddress.parse(cc_tSendMail_2, false));
if(bcc_tSendMail_2!=null) msg_tSendMail_2.setRecipients(javax.mail.Message.RecipientType.BCC, javax.mail.internet.InternetAddress.parse(bcc_tSendMail_2, false));
msg_tSendMail_2.setSubject(subject_tSendMail_2);
for (int i_tSendMail_2 = 0; i_tSendMail_2 < headers_tSendMail_2.size(); i_tSendMail_2++) {
java.util.Map<String, String> header_tSendMail_2 = headers_tSendMail_2.get(i_tSendMail_2);
msg_tSendMail_2.setHeader(header_tSendMail_2.get("KEY"), header_tSendMail_2.get("VALUE"));
}
msg_tSendMail_2.setSentDate(new Date());
javax.mail.Multipart mp_tSendMail_2 = new javax.mail.internet.MimeMultipart();
javax.mail.internet.MimeBodyPart mbpText_tSendMail_2 = new javax.mail.internet.MimeBodyPart();
mbpText_tSendMail_2.setText(message_tSendMail_2);
mp_tSendMail_2.addBodyPart(mbpText_tSendMail_2);
for(int i_tSendMail_2 = 0; i_tSendMail_2 < attachments_tSendMail_2.size(); i_tSendMail_2++)
{
String filename_tSendMail_2 = attachments_tSendMail_2.get(i_tSendMail_2);
javax.mail.internet.MimeBodyPart mbpFile_tSendMail_2 = new javax.mail.internet.MimeBodyPart();
javax.activation.FileDataSource fds_tSendMail_2 = new javax.activation.FileDataSource(filename_tSendMail_2 );
mbpFile_tSendMail_2.setDataHandler(new javax.activation.DataHandler(fds_tSendMail_2));
mbpFile_tSendMail_2.setFileName(fds_tSendMail_2.getName());
mp_tSendMail_2.addBodyPart(mbpFile_tSendMail_2);
}
// -- set the content --
msg_tSendMail_2.setContent(mp_tSendMail_2);
// -- Send the message --
javax.mail.Transport.send(msg_tSendMail_2);
/**
* stop