Android Question How to delete email message?

Beja

Expert
Licensed User
Longtime User
Hi,
I am using the pop3 example in my apps and it works very good.. the problem with the email client is that it organizes emails into a thread that displays a number of messages in one message body, so I need to do extra work in parsing the latest message.
Is there anyway to delete the message after reading it?

Thanks in advance.
 

Beja

Expert
Licensed User
Longtime User
Hi Erel,
Thanks and it worked.. but!
The first time.. the very first time I received the test message normally. After that and for every message I sent, I received a notification in both, the PC from which I sent the message, and the phone where the App is running. The notification reads:

Delivery to the following recipient failed permanently:

[email protected]

Technical details of permanent failure:
The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces. Learn more at http://support.google.com/mail/bin/answer.py?answer=6596

----- Original message -----

Then the original message with all the normal headers.. astonishingly, this failure notice appears in the App as well with the test message at the end of the headers, so if
I parsed the notification and left only the message then the job is done!!!! So why this notification is coming to the destination phone if the email doesn't exist?
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
What's strange is that the error message is displayed on the phone when it should not because that email is assumed not to exist.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
What's strange is that the error message is displayed on the phone when it should not because that email is assumed not to exist.
You are sending a mail which is asumed to not exist and wondering why you get and errorreply from the destination host that the mail do not exist there?
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Couldn't understand it, Don,
This happened after I put the Delete to True as Erel told me.

1- I send an email
2- I received the well-known non-delivery message back in my PC., with the statement that the email doesn't exist
So far so good.. but
3- and this is the strange thing, the pop3 App in my phone received the same email non-exist message..
my question: If the email didn't exist then how did the pop3 server connect to it and sent it that error message:
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
And you are using the same account-credentials on your phone, right? Maybe gmail-account or whatever...

You send a mail form account A to email X (not exiting) from device K.
You get an email send back to the account A if any error happens on the transfer telling about the error. This "returning mail status" can be come from any of the hops the email will try to pass. The point is that you get an email to Account A.
If you then use the same emailadress in your device than the email using in tablet then you will get the email there too.

in addition to your list above
after 2- you will get this mail on your device too when the device is using the same email-acccount.... Your device just get new mails. not more, not less....
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
The only thing left now is that I am getting the message body between html tags.. so if I sent "this is a test" I receive in my phone
<div dir="ltr">this is a test</div>
I can parse this and clean the message, but is there any easier way to get rid of the html tags?

thanks in advance.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
if you don't want to receive these mail like in a spam like tool you just set a fake reply-to address in the header.

you should be able to set the message format to plain text in the mailclient or in the smtp connector. negative part is that you lose formatting options.
 
Upvote 0
Top