How to start activity from mail default application by link (Android) - email

i'm new to Android developing and i'm trying to write an app to send/receive encrypted messages through the default email app.
No problem in sending, since it's easy to send cyphertext email through intents.
I'm finding a lot of difficultes in reception: as far as i know, the email app doesn't broadcast any intent for incoming emails, and there's no way for a developer to access the application's database (right?).
So i thought, as i read in a few topics here, to put a DECRYPT link in the builded encrypted mail that should open my application and decrypt the message. I'm trying to implement it, but i'm confused about a few things.
1) Sending a text/html message with a href tag is supposed to build a link in the body of the email. This thing doesn't work. The link is shown as a plain text.
2) Building an intent and putting in the link as
<a href=intent.toUri()>DECRYPT</a>
and then making an intent-filter for my application decrypt activity should work? The intent i sent as link is just broadcasted when the link is clicked?

Related

Sending email directly from android application

I'm trying to send email directly from my android app. I've found this tutorial and implemented it into my app, but it seems it doesn't work for some reason.
I have INTERNET PERMISSION and I've made asynctask for sending, but it still doesn't send any email. I don't have a server, and I don't want to send over intent. I just want this to work like it should with my email client.

Sending an email from within iOS web app without closing web app and opening mail

Currently when I send a mail message from within an iOS web app (fullscreen from home screen) the web app closes and the mail app opens.
The same thing happens in Color Mail: http://www.apple.com/webapps/productivity/colormail.html. When you send a mail message you are kicked out of the web app.
Is there a way to send a mail message and remain inside the fullscreen web app?
Thanks!
If you want to send an email without using the Apple Mail client (which is basically what you're asking) you'll need to use a web service that support sending email in response to a request.
For example, Amazon's Simple Email Service lets you send email in response to an API query.
However, if what you're after is sending an email message from the user's own account then you unfortunately must exit the app and go into Apple Mail - in much the same way that a mailto: link would do if you used it on a website.
EDIT: IF you were a native app, what you'd be after is the MFMailComposeViewController. It allows you to bring up a standard mail compose interface right within your app.
HOWEVER, since you're not, you're going to have to build your own form interface, and then take the form submission on the web app and send the mail from there.
(Sorry. Didn't read.)

send SMS from WAP page

This question is related to sending an SMS from a link in a WAP page?
Historically I have used sms: which has worked on SonyEricsson, Nokia and other such 'legacy' devices. An example of the mark-up would be;
send
I am aware that i-phone does not allow you to specify the body. If the body tag is present then the device closes the browser and opens the SMS application but does not go as far as taking the user to message creation. As such the following does not really work;
send
however, this partially does... in that it takes the user to the editor and selects the recipient.
send
My tests with Android (HTC desire) cause the message editor to crash (with the above examples). I have managed to get the message editor to open successfully but not managed to pass any details (recipient or message body) using;
send
Note the :// which is not correct according to the Nokia specs. Has anyone had any more success?
Sorry if this is a bit hazy, its probably more of a discussion than a question.

How do I send an image via email through the built-in iPhone Mail app?

I would like to provide my users the ability to send an image/picture (displayed through a UIImageView in the app) to their friends via email using the built-in Mail app.
In a way, I want a very similar user experience to the way the Photos app does this. User clicks on a button, the image/picture is copied onto a new "compose" mail window on Mail app, and then they can finish sending the message over to whoever they want.
I searched quite a bit for tips on how to do this, and found nothing. A few people actually posted before on different message boards that this is not possible at all in SDK-land.
Anyone with more information on this?
If you plan on putting the app in the App Store, you're limited to the standard mailto links as specified in the iPhone URL Scheme Reference:
https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/MailLinks/MailLinks.html
The options you have within the mailto link are spelled out in RFC 2368:
https://www.ietf.org/rfc/rfc2368.txt
The only thing that seemed remotely possible was using the mailto link to set the headers to describe the message as having an attachment and then adding in the MIME/base64 encoded data within the body of the message. I highly doubt that such an approach would work since the mailto link was not intended to be used this way - the RFC states:
"The mailto URL is primarily intended for generation of short text messages that are actually the content of automatic processing (such as "subscribe" messages for mailing lists), not general MIME bodies."
However, even if the above method did work, the RFC still leaves it open to the email client to choose to ignore or otherwise modify "dangerous" headers within the link - so even if you were able to construct a valid mailto URL with a MIME body and the proper headers, Mail.app may still choose to ignore the attachment related parts of your message.
If you try to communicate with Mail.app in any other way, you have a very high likelihood of being rejected by Apple.
send the image to a web application that will inturn do the sending. using the mailto scheme will launch iphone's email application but your application will quit meaning the user will have to relaunch it later..

How can I check if an e-mail has been read using POP3/SMTP?

How can I check if an e-mail has been read using POP3/SMTP?
I am able to read e-mails, but I can not figure out if the e-mail has been read or not. Any suggestions are appreciated.
There is no completely reliable way to do this, while some servers support Read receipts it is dependent on the client to respond to the receipt request.
Another way people do this is by embedding a tracking image into an HTML email that will get pulled from a server and that hit constitutes the read however this is often not accurate as most email reader block html external content by default.
Sign up for a free account on statcounter.com. Goto the install code options, choose invisible tracking button and HTML only counter. Statcounter will now provide you an HTML Image snippet that you have to insert inside the body of your HTML email message.
The image isn't visible in the email but the person will have to click "Display Images" when they open their email client.
This is about the only way you can do it if your server or client does not support read receipts.
With POP3, emails are almost always deleted from the server after they are read. When a client connects to a POP3 server, the server usually transfers emails to the client and then deletes the email from its own storage. So, if you can read an email, chances are that it hasn't been read.
As far as I know this is a client side only detail when it comes to POP3. If you wanted to have the status reflected on multiple clients you'd need to used IMAP. With web mail readers they keep track of the unique message ID and whether or not it has been read on the client, but if you were to load it on a desktop pop3 client, it would not be flagged as read.
store the latest read email's message-id somewhere and check when you run to pop
There is no guarantee an e-mail has been read or not, especially 2 cases we won't receive a Read Receipt,
When user opens an email for the message a pop-up confirmation window opens, if user selects No then end user wont receive a read receipt.
From email settings, If user selects Never send a read receipt then also end user wont receive a read receipt.
If user enabled Read Receipt then, the request for the receipt is sent as a header attached to the mail using the method
MimeMessage.setHeader("Disposition-Notification-To", "email-id#domain.com");