iOS app creates email...is there a way to not have a copy of it in the sent folder - ios

My app creates an email that can have sensitive data in it (depending on the users perspective). Is there a way on the iphone's email client not save a copy in the Sent folder.
And in the same way, if the user choses they can send it via text..is there a way to not have it be in the Message streams.
I'm thinking there is not but I'd love confirmation of this if possible. I've been scouring but can't seem to tell if it's possible.
Thanks.

I'll break this into two parts:
Not putting a copy of a sent message in the sent folder:
There's no easy way to do this since you don't have access to a user's mail. You could have the user enter their email service's IMAP details and write your own mail sending implementation that then goes and deletes the sent message from the server, but it's possible that mail clients would keep a local copy regardless of what happens on the server if they grab the message before you delete it. Regardless, this is a really terrible user experience (having the user enter IMAP details, not using the built in mail composer) and it'd be difficult to write (and you would need to be insanely careful about deleting something from a user's mailbox, and you'd have to ask them if it's okay to do so).
Not showing a text message in a Messages app conversation stream:
There's actually a way to do this. Text messages can be sent to users via a specially formatted email address that's different for every cell service provider. For example, to send a text to a Verizon subscriber it'd be 5551239876#vtext.com. For this solution to work you'd need to send the message using some sort of automatically generated email address that you retrieve from a mail server you've created, and then you'd need to implement your own SMTP mailer on the device. Of course, a user can always request text message transcripts from their cell service provider (and some have easy access online) and there's no way around that.
How sensitive is this information? Email and text message aren't very secure protocols. You may want to consider alternative methods that provide encryption and authentication mechanisms.

No its not possible if you are using the built in mailer in iOS. Something you could do if you wanted to get around this would be to make a customer mailer, send the information to a server and send off the mail through code but this is quite a bit more work.

Related

How to disable sending default emails when a user place an order?

I am working on a Third party application where I want to send customized template emails to user using webhooks when user place order or shipment gets created.
Is it possible to prohibit system to send email to user who place order and instead of that just fire an event to a third party app(using a webhook) so that that third party app will send email to that user with required and customized new details in new email template(which is not available in default variables of email templates)?
Any solution for this? Please
There's two options. One enables you to prevent emails from being sent and the other repurposes the initial default email. There isn't currently a way to disable the email from being sent as the setting doesn't existing in BigCommerce.
Option 1
Set up an SMTP server and configure mail relay rules
SendGrid covers some good basics on what mail relay is. BigCommerce has a support article for connecting your store to a custom SMTP server. You can also see more in the instructions from Microsoft on how to configure mail relay rules for Exchange.
Overall, this option is more complex.
Option 2
Conversio has a quick and easy guide on replacing the content of the default emails. It isn't the ideal solution, but it is less confusing than sending two receipts.

Rails and email openened notifications

I am developing an application on Rails and I need to know if its possible to write code which will notify me when the user opens an email that has been sent from my application (need to track this info) ?
The main bit of data I need is was it opened.
thanks
You can do this but there is no 100% certainty you will always get a notification.
SMTP has 2 standards, they are DSN and MDN. Both are in effect optional, there is no guarantee that the email system of the targeted email recipient (your user) will implement them too.
The easiest way is to pit in a "Return-Receipt-To:" (RRT) email header. Put some address as the content of the header. Now when a user opens an email message containing this header, the clients email reader will msot likely prompt your users whether or not to send a return receipt. If the do comply and email will be sent to the address you specified.
In Rails it could be something like:
themailer < ActionMailer::Base
def notify_read
headers['Return-Receipt-To:'] = 'notifyread#mysite.com'
mail(:to => 'users#somecompany.com')
end
end
You could just use an email address you monitor and read them manually OR you could set up rails to read these emails as well. But there is no guarantee you will ALWAYS get an acknowledgment.
Additionally you could check each email domain, many of the big free email providers have proprietary methods of requesting the return receipt. If you add ".readnotify.com" onto the end of your recipients email address you will get a return receipt. You will have to research all the big ones though.
For example:
user#yahoo.com.readnotify.com
Hope that helps
Source: http://railsforum.com/viewtopic.php?pid=147997#p147997
A common way of implenting this is to include a link to an invisible image file, with the link including sufficient details about the email for you to be able to identify which email is being viewed.
When the image is requested by the mail client, your server can then record the viewing attempt. If you use a 3rd party email provider (such as sendgrid, postageapp) then sometimes they'll do that for you and ping your server with the appropriate event. I strongly suspect that this is what readnotify is doing under the hood (someone took the trouble of looking at this a while ago
This isn't completely accurate as some (many?) users turn off remote image viewing in their mail viewers.

Is there a way to setup a fake email inbox to check that email messages are being sent in ruby on rails?

I'm testing several user accounts and don't want to setup different emails to test with. All I need to know is if the email has been sent from my app successfully.
Is there a way to setup a fake email inbox to check that email messages are being sent in Ruby on Rails?
Set up MailCatcher:
MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. Run mailcatcher, set your favourite app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, then check out http://127.0.0.1:1080 to see the mail that's arrived so far.
This does several useful things for you:
Not only can you see that email is being sent but you can look at the email (text and HTML parts) as well.
You won't have to worry about spamming anyone as all the email your application sends goes straight to MailCatcher.
You won't have to worry about setting up a bunch of real email accounts anywhere, MailCatcher doesn't care what the addresses are, it just grabs the email and shows it to you.
Most importantly, your application doesn't have to change to use it, you just set up the appropriate SMTP values and away you go. This means that you're not running different code paths for your email handling in development, testing, and production and that means fewer bugs and late night disaster calls.
During development and testing, emails are also shown on the console. That has always been enough for me – I don't doubt rails' ability to actually send it once it's in production.

How can I integrate internal messaging with emails in asp.net?

in github when a user sends you a message two things happen. You get a "new Message" on your github dashboard and you receive an email.
if you reply to that email it triggers a new Github message internally... so the users can actually have a full conversation through their email client without going into github even though Github is managing it all.
I know Malgun/Sendgrid have apis to manage receiving of emails (they send a POST request to your app when an email is received) but I need a little more info on how to do it... how exactly can I set up my app so that when a user receives a message they can just hit reply on their favorite email client while still maintaining track of that conversation. (they can still check their messaging history through my site)
Does anyone have an idea how exactly they do it?
Please help.
How this is implemented really depends on how you can handle incoming messages. If you're able to receive your emails as a POST to your application, then the email is really no different to a user sending the message on your site, you just need to parse the From: header from the email, and look up the user, and strip the fluff out of the email.
If you're writing your own code to handle the emails (eg. that polls a mailbox), then you could just POST them over to your app in the same way, or parse them up and POST more structured data.
Once you have the data, it's easy to construct a message and write it to your DB (and fire off email notification to the user, remembering to set the Reply-To: or From: headers so your script gets the replies). Most of these kind of messaging systems don't keep track of conversations/threads, but just store a string subject (and use "Re: ...") to keep things simple, though you could obviously add this if you're feeling ambitious!
If you're doing this, you should be security in mind - malicious users may POST to your email script, and email headers can easily be forged. Spammers will also use any possible scripts they can find to relay mail through other peoples servers.

How do I send and receive encrypted email in Ruby on Rails?

I have a rails application that triggers Emails on certain events. These emails are sent to a separate company who will add some additional data to the email when replying. This is all understood and working, I am parsing the replies, extracting the data and it works fine.
I have now been asked to encrypt the emails.
Does anyone have any experience/ideas on the best way to do this?
I can not guarantee what Email client the 3rd party will be using so I need a solution that would work generically across many email clients. The encryption must be made both by my application when I send the email and by the client application (Outlook, Thunderbird, Entourage etc) when it replies. I will then need to receive the encrypted email, decrypt and parse it to extract the new information I need.
Can anyone point me at plugins/documents that would help me achieve this?
If the other end doesn't use your application, you should use S/MIME or PGP.
Most desktop email clients support S/MIME out of the box, and PGP is usually available as a plugin (for Thunderbird there's Enigmail, for Apple Mail there's GPGMail, etc.).
Also, S/MIME needs certificates, which you can create yourself or purchase from a Certificate Authority (like Verisign or Thawte), depending on your needs.
I'm sure there are S/MIME and PGP libraries for Ruby, but a quick search didn't reveal the "one true library" for me. However, you can always let OpenSSL (for S/MIME) or GPG do the heavy-lifting for you.
I think Güder's answer is excellent, but keep in mind that all that necessitates that the user already have something like GPG installed and an associated key available. This grueling setup process is about 95% of the obstacle to getting email encryption more widespread.
Are you certain that the individuals who commissioned this project understand that it's not as simple as flipping a switch in the code to send encrypted emails?
One option is to incorporate in the install process for your program a key management routine that depends on (and includes) GPG. Then the user could select a very difficult passphrase (make sure to run checks on it so it's at the very least alphanumeric, etc.), a public key could be generated from that, and uploaded to the popular keyservers.
The generated key could be used for the emails the program generates, and most importantly, the key would be unique to each user. Then you can do a regular external call to the default email client on the user's OS to open the email.
To make sure that the email gets opened up encrypted, I would check on the environment and get the default email client, then send the email from your program with the necessary flags necessary to have the generated email be encrypted. This means it's going to be different for Thunderbird's Enigmail than it is for Apple's Mail, for example.
But don't forget about OpenSSL, certainly....

Resources