How do I associate notification mail reply to user's inbox? - ruby-on-rails

I have an Rails web-application where a user can send message to any other registered user. Once a user sends a message to another user, another user gets a notification on application and also by email in his/her personal email inbox (Like basecamp).
I want to implement this functionality where if a user reply to a message from his/her personal email inbox(say gmail/yahoo), the message becomes available in the application and receiver gets a notification as usual.
As I could understand, we’ll need to associate a unique id and set it as reply-to field in notification mail. Any help in the right way to approach this problem will be very much appreciated.
Thank you

We are already using sendgrid. And sendgrid provides web-hook for emails. Which is quite easy to integrate with a rails application. It also uses mails gem. I'll keep posted if I find anything new on this.
I'm still working on finding out how to associate unique id in reply-to field in email. Any help on this will be much appreciated.
Thanks,
Chandan

Related

appointment confirmations via email

I am interested in finding out how I can send my business customers appointment confirmation emails to their Gmail accounts and have their Google calander automatically populate the info and give them a reminder without any action required on their part. I know it's possible as I received such emails from companies that have done this. Can anyone please help? I'm not the most computer savvy person so I will need an explanation. thank you.
#carl grassl You will want to use EventReservation for appointment confirmations.
When you send your customer an email confirmation with EventReservation, this will automatically populate the info of the appointment in their Calendar, additionally, it will also trigger a Google Now card of the appointment.
Check out this tool below, logging in with your personal Gmail account:
http://gmail-actions.appspot.com
Once you've logged in, load the sample "Event card." You can send yourself an EventReservation email.
When you feel that you got everything locked in with your production email client, you'll have to register with Google to use schemas. Make sure your email is authenticated (DKIM/SPF). You can get all the details here:
https://developers.google.com/gmail/markup/registering-with-google

Is it possible for users to contact each other without knowing their email addresses via Mandrill?

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

Email survey monkey survey automatically

Is it possible to automatically send a survey to everyone who registers at my website as soon as they are finished with the registration process? As I understand send_flow only sets up a flow and the user still has to send the email through the surverymonkey interface.
If you need to use the features of send_flow to distribute your invitation via SurveyMonkey's mailer, you can send the email immediately by setting "send" to true in your request to send_flow. The email will send in about 5 minutes as will all email sent from SurveyMonkey.
Using send_flow will create one collector for each request which could get unwieldy in SurveyMonkey's UI, but it will work.
Maybe you want to check out Examinare instead? You can with less than 10 code rows do this by combining the following functions:
Create the recipient:
https://developer.examinare.com/apidocs/addrecipient/
Send the email with the created ID:
https://developer.examinare.com/apidocs/sendsurvey/
I bet if you contact Examinare support email you will get help from them.

Rails sending emails through an outside email service

Alright so I've got an app in which users can send 'invitations' to other users to download files. What I'd like to do is set it up so that rather than using ActionMailer I can ask users for their username/pass to their Exchange email account and then send the invitations through their account. Ideally I'd like it so that after sending an invitation through their site it will also pop up under sent emails in their account. I'm a bit unsure about how to go about this besides a rough idea of a few ajax calls and wanted to see if anybody had any experience in something similar/good ideas about how to structure this.
Thanks ahead of time!
You would still need to use ActionMailer to send the email. However, you would be routing the email to be sent from ActionMailer through the user's SMTP server.
msg = MyMailer.some_message
msg.delivery_method.settings.merge!(#user.mail_settings)
msg.deliver
Where in the above mail_settings returns some hash with appropriate keys IE
{:user_name=>username, :password=>password}
There is more information regarding this on this post. How to send emails with multiple, dynamic smtp using Actionmailer/Ruby on Rails

Rails, SendGrid - Forwarding mailer-daemon emails to user

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 .

Resources