I have an application that allows users to send an invitation to a friend. Emails are being sent out using SendGrid. I am wondering if it's possible to forward the mailer-daemon emails back to the user in an event they type in an email address that doesn't exist.
So for example a user enters in the email 'thisisnotreal#fakedomain1234.com' to send the invitation. I want to be able to notify the user that the email they have entered doesn't exist. Usually when you just send an email from an email client the server lets you know right away that the email is not able to be delivered. I am wondering if it's possible to do this as well through SendGrid.
Take a look at the event notification section of the SendGrid API. You can add a page to your application that accepts POST requests from SendGrid, and then you'll get event notifications in real-time.
When a bounce event is posted to that listener from SendGrid, you could then lookup the user that needs to be notified via the recipient email. If you don't have this relationship available in your local store, you could pass a unique argument to SendGrid at send time that contains information you can use for the lookup - unique arg information is included with event notifications. Then it's just a matter of taking the appropriate action required to notify your user - either with an email or via a notice on your website or a text message or whatever is best for your application.
This maintains asynchronous communication. You'll be alerted when something goes wrong without having to add blocking code, and you can send your users a nice branded message (using SendGrid, of course) rather than just forwarding a mailer-daemon response .
Related
Know a user can send a mail using he MFMailComposeViewControllerDelegate as mentioned here, but how to send a conformation mail to the user after the set of specific task has been done.
For some reason it feels like apple doesn't allow in sending background mails, without user conformation, which is fine.
The task is to send a conformation mail like after you buy productA, productB and pay, need to send a receipt to the said mail id.
Any guide in the said path would be greatly appericiated
You can't send an email from the user's email address without using an MFMailComposeViewController, and you can't send an email to the user without the use of a server.
What you should do is prompt the user to enter their email address, send that as part as their purchase, and then use a server-side mail app to send a confirmation email to the user-provided email address.
You can't send it directly from users device without email composer.
Only way to do this will be to prepare your own server that will handle those events and send proper emails from server side.
My website allow User A send email to User B through a form. Currently if User B want to reply, he need to login to my website and use the same form.
User A dont know the User B's email address and vice versa.
I would like to allow User B reply to User A directly using his mail client without need to login to my website (while still keep both email addresses confidentially). So User A send a message to User B using the form. User B can reply to user A using his email client, and user B can reply to user A using email client too without reveal their email address.
I was told this is possible with Mandrill Webhook. Is that correct? Can anybody please show me how?
Thanks a lot.
I think what you need to do is inbound email processing.
First, create an inbound domain in your Mandrill dashboard.
Set up routes / webhooks in your dashboard (for example, sending an email to pm#example.com will send a POST to http://example.com/email-processing/pm).
In your application, process the received message and decide if you have to send it to one of your user, and more important, which user.
To do so, you can add a unique ID inside your emails. So you just have to read this ID when you receive an email, and you know who is the sender and who should be the receiver. Of course, you should also check the sender's email address.
More informations about the first two steps: http://help.mandrill.com/entries/21699367-Inbound-Email-Processing-Overview
I'm working on a free iOS app; at the end of the registration (when the user has registered a good phone number and good email address) I want the user to enter a code which he has received on his phone or email.
But the problem is how to send automatically a SMS or an e-mail programmatically that contains the code?
I don't want the user to be redirected to a specific view controller to compose a message by himself (like with MFMessageComposeViewController or MFEmailComposeViewController)
just and only just the same appearance of SMS or email sent to users but with a different activation key (for the keys, I think about auto generated keys stored in a database).
And I think about the same way for forgotten identifiers, the user enter his email address or his phone number in a text field, and a message is automatically sent with the password and the username of the user, if the email address or the phone number entered is already existing in the database, if it is not, it shows an alert view with an error.
Does anyone have an idea for how to do this?
You can use the following services Parse.com + mailgun. Search on Parse.com for a tutorial using mailgun and it should accomplish what you are trying to do. On a side not, be careful when creating an app which does not allow the user to use it until they enter some access code, it is against the Apple rules and could lead to rejection.
I assume you have a server that generates this activation code that is sent to the user.
When the user enters the text field with the code he got it should be sent back to the server with an http request (use NSURLConnection ). The server should response to the http request with approval or error whether the code is right, or send the username and password and any other data the user needs to continue.
I am building an email app in ruby on rails and I had a basic version which just used to send emails using AWS SES but recently I received a mail from AWS team saying that most of the email which I have sent had bounced back and they will discontinue my account if I send emails to the bounced email ids.
Is there any way to verify before sending email to any address that whether that email exists or not and valid or not.
Any gem or work around will help me a lot
The general way to do this is purely from a system design point of view. If you are going to collect an email address from one of your users and send them email periodically, or as events happen etc, then you should first ask them to "verify their email address". This typically involves generating a unique token, putting that into your database, linked with the user, then sending an email containing a URL with that unique token in it. The user clicks the link, which goes to a controller in your Rails application that matches the token against the user. If they can't follow that link, they can't read your emails, so don't send further email to that address.
If you obtained the email addresses through "other means", you're down to setting a Return-Path address on the outgoing email (bounces will be sent here), then checking that mailbox for bounces. I'm also often suspicious of how people happen upon a list of email addresses that didn't come from users consenting to an agreement with your website.
You could use the Mail gem to do this, but you need to know how to set up an SMTP server that pipes the email into your Rails application, which is not straightforward without prior experience. You can also use a variable Return-Path address (VERP), such as <some unique hash>+bounces#your-domain.com, where <some unique hash> references the email address in your system. This takes away the pain of trying to parse and interpret the bounce email, since the address it is sent to tells you who the bounced recipient is.
i want to build a Ruby on Rails web-apps where using facebook style notification, for the push server i'm using FAYE, is there any solution to broadcast notification for specific client, for case studies in Facebook only your account have notification if somebody send you a message or tag your photo. Thanks
In your client side JavaScript, subscribe to a channel name based on the user (e.g. '/messages/userid_1234') and use that to send private messages from the server.
For security reasons, don't use the actual user ID or even a hash of the username or email, since someone could spoof a subscribe that way. Generate a random GUID on signup for each user and store that with your user's account details.