getting the read receipt - java

I am using javamail for sending emails. My requirement is to get read receipt from the recipient.
So far from my search on the net I have come across to some third party services which uses Images for this purpose. One drawback I have seen in those services is that in gmail we have to click on display image to open the images, and if user doesn't click on it then we can't get the read receipt from user even if he has read the mail.
So my question is what are the other ways to get read receipt. Without using third party services.
Thanks in advance.

There's no reliable way to do that, mostly because it's a privacy issue. You can ask for a Message Disposition Notification, but at best the client will ask the recipient whether to send a return receipt. As you know, you can also embed an image that will get loaded when a message is viewed as HTML, but (1) some people will still view plain text instead of HTML, and (2) image loading is blocked by most HTML mail programs specifically to prevent what you're trying to do.

Related

How to send photos,videos and other files via web sockets (Socket.IO) in Android?

I have tried converting media into 'base64' string then tried to send it. But I think for more long string there will be problem to send that string via web sockets. Kindly share better idea for that.
There are 2 options to do the same,
Peer to peer file transfer:
This uses XMPP mechanism of P2P file transfer and is only suitable for when both users are online. We usually recommend using cloud stored file transfer (see below) unless you have concerns / limitations on server-side.
Cloud stored file transfer:
This uses QB Content API to store files when sent by the user and to retrieve them when other user(s) are ready to download them. The user experience is seamless and allows the user to send/receive files even when the other user is offline, the other user can open the conversation any time and download/play the file.
On client side, typically you want to handle things like progress bars, thumbnails for photos and videos etc.
I read this on Quora and it works

Best way to receive images uploaded by a user on Android app?

I'm working on an app that lets users submit orders, and also make custom orders where they upload an image. I then want to receive all this information by email. Initially, I was using JavaMail API with Gmail, but I heard that it can cause a blocking of the account due to "Suspicious Activity". Apparently a way around this is to use the Amazon SES SMTP server, but with that I cannot seem to find any documentation whatsoever on sending emails with attachments for Android (there is one but it's for general Java and it does not work on Android).
There must be a better way to to do this, I'm just not sure where to start looking. This is my first dev project (I'm in my 2nd year of computer science), so I'm pretty green with this stuff. If someone could point me in the right direction I would be so grateful. I'm open to learning new things, I'm just not even sure about what I need to learn in the first place for this.
your email will be blocked if you are sending emails in huge amount like hundreds of email in a second if you are not sending email in such amount so don't worry about getting blocked and if you are sending in email in such amount then you can take external email service theirs a lot of marketing via email services i hope this might help

Encrypting/hiding portions of the source code

I've made a simple mailing app that takes in email credentials and uses it to send emails of certain kinds to selected addresses. Problem is, I've had to input the credentials right into the code, so anyone who uses dex2jar can get the source code and get the email used for forwarding and easily make the app obsolete.
I imagine I'm not the only one facing this issue, so what are some ways to make my code secure?
No matter how good of a technique you use to hide the credentials, if it's in the code then it can always be found.
Instead of hard coding them in, you could perhaps let the user specify them when he starts the app? If that can't be avoided you could instead have a remote service that will do the sending and forward your request to that.
You can not both connect to an e-mail account and keep those same users out of said e-mail account. Consider using a hosted server as part of the project to securely connect to the e-mail account from the server level and process these e-mails remotely.

how to check a mail sent by java application is read or not? [duplicate]

This question already has answers here:
How Can I Know when a User Reads an Important Email Notice? [closed]
(5 answers)
Closed 8 years ago.
Please help me on this requirement.
We are sending mails to users using java application.
Now, we want to implement the below features.
When the mail is open/read by the user, then we want to save the time stamp in the database.
How many times the person opens the mail which we sent to him/her.
Please help me how to do this.
Thanks for your help.
In general, this is impossible to get with 100% certainty. Email is normally fire and forget. However, there are some commonly used tricks to get an idea.
You can make the email an html email with a 1 pixel image embedded. As you send out the emails, you make a new image url for each outgoing email (I'd go for one per recipient) and save that url somewhere (for example in a database). You also have to set up a very simple server that will accept requests to the image urls you're creating. That server then responds to those calls sending each of them the same simple 1pixel image and noting which url was called (this can be done with a simple Apache server, using access logs to track the urls). Every time a user opens your email, his email client would normally go and load the image. Your server then gets a request and since you made the url unique for every recipient, you know who opened the email when. Caveats: if the email is forwarded, other people can activate that same link; the user can configure the client to not open images; etc.
If you look around a bit, you might find some off the shelf solutions as well.
If you happen to also have control over the email server and/or the email clients of your users, you have a lot of other possibilities.

Getting multiple Java pop3 clients to work with GMail

I have written a nice program in Java that connects to a gmail account and download atachments sent to it. Once an attachment has been downloaded, it is marked as read and is not downloaded ever again. This program will have to run in multiple instances with each program downloading unique attachments so that a single attachment is never downloaded twice. The problem is that at the moment if the attachment is of a decent size, one program is still downloading it, when another instance connects and also starts to download the attachment before it has been marked as read.
I have tried checking and setting various flags and checking whether the folder is open, nothing seems to work. Any solutions?
Update: Thank you for the quick answers, sadly IMAP is not an option due to other reasons.
Consider using IMAP instead - it is designed for client-server interaction.
From RFC1939 (Post Office Protocol - Version 3):
POP3 is not intended to provide
extensive manipulation operations of
mail on the server; normally, mail is
downloaded and then deleted. A more advanced (and complex) protocol, IMAP4, is discussed in RFC1730.
I don't think POP3 is made for multiple simultaneous access.
Ask yourself this: do i really need multiple processes accessing the same mailbox?
If you do, you'll have to find a way to have these processes communicate to each other.
Use a common database or server process to coordinate actions.
IMAP does have more options, but i'm not sure if you can "lock" a single mail to mark it as being processed.
As the others have mentioned, POP3 isn't really intended for this kind of scenario.
If you absolutely have to use POP3, I'd suggest downloading all the e-mail to an intermediate server which sorts the messages and makes them available for each of the other clients.
It sounds like you're just trying to distribute the processing of the e-mails. If that's the case, you can just have each client connect to your intermediate server to retrieve the next available message.
I'm not sure what your constraints are, but you may even want to consider receiving the attachments some other way besides e-mail. If people are uploading files, you could set up a web form that automatically sends each file to the next available instance of your application for processing.
If you need to stay with a POP3 connection, you could keep a local database of previously downloaded message ids. Then new instances could check against that before downloading again. The best solution is just to use IMAP, though, as IMAP is able to set the read/unread flags before downloading.
You could mark the mail as read before starting the download, and then start downloading it.

Categories