Delete mail from server

One Star

Delete mail from server

when I select the option for deleting the mail from server using tpop component while downloading the mail, it downlaods a partial mail file but it deletes the mail from the server and the component stops throwing an error. I am using IMAP protocol and i am accessing gmail server. I am attaching the error message along with this.
Can anyone tell me whats happening with this?
One Star

Re: Delete mail from server

My job is to download mail files from a server and save the attachments in the mail file to my local server.
I am using the tpop component to do this and am giving the fileneme pattern as ( "downloaded_mail_" + (counter_tPOP_1 + 1) + ".mail") . This will save the files as downloaded_mail_1,downloaded_mail_2,....
I thought doing this will be helpful in downloading attachments from the files using tfileinputmail component.
The job extracts only one mail from the server at a time, downloads the attachments and deletes the email
file from my local machine once the attachment gets saved. This job performed fine. I put this job in a loop and I selected the option for deleting the mail
from server in tpop component so that the job running in the loop will not be downloading the same email every time.
This is where I get the error. The mail is getting deleted from the server but an incomplete mail file gets saved in my local machine and
the job stops there throwing some error. So I thought of using two tpop components. One in the main job which downloads the mail and another inside a
loop which will delete the mail from server alone. Even this process gave the same error and stopped the job. There is some problem in deleting mails from
server.
One Star

Re: Delete mail from server

Hi
can u put some screenshots of your job
One Star

Re: Delete mail from server

Sure...
This is the main job...and the loop after tfileinputmail is a job that deletes the mail from server
One Star

Re: Delete mail from server

Is there a way to move an email from inbox to another folder using TalenD?
Community Manager

Re: Delete mail from server

Hi
What is purpose of tRunJob in your job? Why don't your check the option 'Delete emails from server' on tPOP while retrieving the emails from server.
Is there a way to move an email from inbox to another folder using TalenD?

No, there is no component can do it yet.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Delete mail from server

Hi,
I tried using the delete mail from server option in tpop component. It delets the mail from my server before even downloading it. For example my file is 150 KB and it downloads fine when i dont use the delete mail option. But when i select the delete mail from server option a .mail file of 2 or 3 KB gets downloaded, my mail gets deleted from server and the jobs stops throwing some java exception.
So i thought of creating a job that downloads alone without deleting option and the other is the TRunjob in which I am using a tpop component here with delet mail option. So this should be deleting the mail which was downloaded earlier. It deletes the mail but the job but stops because of the error. I even tried giving condition as onsubject error...but still its the same...
Community Manager

Re: Delete mail from server

Hi
It delets the mail from my server before even downloading it.

ah, really? Which version are you using? It should download the mail before deleting it. I will test it and see what is wrong.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Delete mail from server

I am using Talend open studio V4.2.2
One Star

Re: Delete mail from server

the error message is attached with the first post in this thread...
One Star

Re: Delete mail from server

I am not using the licensed version...will that be the reason for this issue?
Community Manager

Re: Delete mail from server

I am not using the licensed version...will that be the reason for this issue?

No, TIS and TOS have the same component function.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Delete mail from server

I extracted a job I had in the Talend Open Studio and imported the same to the Talend Data Quality. The job which performed fine in the TOS is throwing some error in the TDQ. I have attached the screen shot along with this comment. Can anyone please have a look at it and let me what could have caused this issue.
Regards,
Bharathan
One Star

Re: Delete mail from server

Shong any update on this error? Works perfect if I uncheck delete.
I too am getting the following error with IMAP using gmail.
File does get "deleted" (meaning label is removed from mail) but get the following error.
Screenshot of settings included (user pass removed)

Exception in component tPOP_1
java.io.IOException: No content
at com.sun.mail.imap.IMAPInputStream.fill(IMAPInputStream.java:111)
at com.sun.mail.imap.IMAPInputStream.read(IMAPInputStream.java:158)
at beta_test_sf_load_account.proofemailprocess_0_1.ProofEmailProcess.tPOP_1Process(ProofEmailProcess.java:1258)
at beta_test_sf_load_account.proofemailprocess_0_1.ProofEmailProcess.runJobInTOS(ProofEmailProcess.java:3874)
at beta_test_sf_load_account.proofemailprocess_0_1.ProofEmailProcess.main(ProofEmailProcess.java:3738)