• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Filter emails with subject and forward them

#1 2008-05-20 19:35:13

covenant13
Member
Registered: 2008-05-19
Posts: 10

Filter emails with subject and forward them

Tags: [email, file, java]

Hello,

I have 2 questions, how can I filter email with subject?
I have tPOP -->tFileInputMail-->tLogRow.
This receive all emails with attachments, but i want to receive only emails with subject: "2345345". How can i do it?

2 question is:
How can i forward received mails with attachments?

Thanks for reply.

Offline

#2 2008-05-21 07:25:01

shong
Talend team
Registered: 2007-08-29
Posts: 10305
Website

Re: Filter emails with subject and forward them

Hello

This receive all emails with attachments, but i want to receive only emails with subject: "2345345". How can i do it?

You can define only one column 'subject' and its mail part is "subject".

2 question is:
How can i forward received mails with attachments?

On tFileInputMail component, there is a attachment export directory.

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2008-05-23 17:15:43

covenant13
Member
Registered: 2008-05-19
Posts: 10

Re: Filter emails with subject and forward them

Ok. I know this informations.

But how can I filter by subject? Is there any scheme to do this?

And about forwarding mails:
I know that scheme must be tPOP_1-->tFileInputMail_1-->tSendMail_1.

But what I should write in tSendMail in the field Subject?
If I write e.g. $tSendMail_1[1] it gives me an error.
I write in java.
Can somebody help me?

Offline

#4 2008-05-26 04:23:06

shong
Talend team
Registered: 2007-08-29
Posts: 10305
Website

Re: Filter emails with subject and forward them

Hello

Please see the screenshots.

Best regards

         shong


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#5 2008-05-26 21:29:55

covenant13
Member
Registered: 2008-05-19
Posts: 10

Re: Filter emails with subject and forward them

Thank you shong, subject and CC is working fine, but e.g. body isn't working. It gives me error:

Exception in component tSendMail_1
java.lang.NullPointerException
    at javax.mail.internet.MimeUtility.checkAscii(MimeUtility.java:1286)
    at javax.mail.internet.MimeBodyPart.setText(MimeBodyPart.java:1023)
    at javax.mail.internet.MimeBodyPart.setText(MimeBodyPart.java:718)
    at javax.mail.internet.MimeBodyPart.setText(MimeBodyPart.java:702)
    at msn.mail.mail.tPOP_1Process(mail.java:689)
    at msn.mail.mail.runJobInTOS(mail.java:899)
    at msn.mail.mail.main(mail.java:806)

How can I copy "body" and "attachments" to send mail?

Offline

#6 2008-05-27 04:29:10

shong
Talend team
Registered: 2007-08-29
Posts: 10305
Website

Re: Filter emails with subject and forward them

Hello

Exception in component tSendMail_1
java.lang.NullPointerException
    at javax.mail.internet.MimeUtility.checkAscii(MimeUtility.java:1286)

I have tested the body part on TOS2.4.0RC2, I always get null value, it should a [Bugtracker, bug 3927, fixed] null value on body part.

I aslo tested it on TOS2.3.0, it works fine.

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#7 2008-05-27 07:34:14

covenant13
Member
Registered: 2008-05-19
Posts: 10

Re: Filter emails with subject and forward them

On some mails it works fine, on some i get this error. I'm working on ver 2.3.3.

Offline

#8 2008-05-27 07:46:11

shong
Talend team
Registered: 2007-08-29
Posts: 10305
Website

Re: Filter emails with subject and forward them

Hello

On some mails it works fine, on some i get this error. I'm working on ver 2.3.3.

If you work on TOS2.3.3, you can add a tMap component between tFileInputMail and tLogRow and deal with the null value on tMap, for example:
row1.body==null?"This is an empyt email":row1.body

Best regards

         shong


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#9 2008-05-27 17:09:56

covenant13
Member
Registered: 2008-05-19
Posts: 10

Re: Filter emails with subject and forward them

Thanks.
I check this. It gives me the same error sad.

And what about attachments?

Last edited by covenant13 (2008-05-27 20:00:11)

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Filter emails with subject and forward them

Board footer

Powered by FluxBB