14
- Srikanth & Prabin

Inbound Emails for Every Web App: Angle

Embed Size (px)

Citation preview

Page 1: Inbound Emails for Every Web App: Angle

- Srikanth & Prabin

Page 2: Inbound Emails for Every Web App: Angle
Page 3: Inbound Emails for Every Web App: Angle

What?

A system to catch all inbound emails of a domainand

attach a webhook to them based on defined patternsand

avoid the hassle of creating/reading thousands of email addresses

Page 4: Inbound Emails for Every Web App: Angle

Why?

● Email is still used very widely● Providing alternate way of capturing responses from users who

shy away from clicking links sent on email● Linking responses to email directly to business logic without

creating actual email● Assign unique email addresses for every user/job/any other entity

without actual email

Page 5: Inbound Emails for Every Web App: Angle

How?

● Setup mail exchange on AWS using “mailin”● Configure mx record of “desired domains” to point to server

hosting the exchange● Configure exchange to forward mails to angle api● Configure angle to define baits for different mail domains● All incoming mails are directed to the respective application APIs● Application can handle the mail content as per their business

logic

Page 6: Inbound Emails for Every Web App: Angle

How?

Mail Exchange

Mail domains:- referralrecruit.com- csm.naukri.com- rmj.naukri.com

Bait configurator

+Mail sorting

+Virus scan

+Parsing

Api calls to individual apps

based on Bait configuration

Mail IDs with application defined keysEg: [email protected][email protected]

Junk mails gets discarded

Page 7: Inbound Emails for Every Web App: Angle

Features

1. Bait configurator

2. Reporting for total replies and successful

3. Support for multiple email domains from single server

4. Multiple patterns for a single domain

5. Independent of application logic

Page 8: Inbound Emails for Every Web App: Angle
Page 9: Inbound Emails for Every Web App: Angle
Page 10: Inbound Emails for Every Web App: Angle

The Application side (e.g: Referral Applies)

Referral Introduction:● Naukri has a referral tool for companies● Recruiters create referrals to which employees invite applications

from their friends through social networks● Applicants apply to an email like [email protected]

So how do we intercept the email sent to this non-existent email id and get to know which employee referred this applicant?

Here comes the role of Angle,

Page 11: Inbound Emails for Every Web App: Angle

How to make it work?

1. Generate a reply-to email address consisting of employeeid, jobid and any other information to identify the context. e.g: <employeeid><jobid>[email protected]. Set the email as reply to address to the mail sent to employees3. When employees reply to the email with referral CV, the reply content along with attachments is forwarded to the API specified by referral application4. The referral application identifies the employeeid and jobid from the email address and creates referral

Page 12: Inbound Emails for Every Web App: Angle

REFERRAL

Referral requestCreates unique reply address for each employee and jobs

Employee reply to email with friends CV

API to Referral with attached CV, reply email address and mail body details

Page 13: Inbound Emails for Every Web App: Angle

Use Cases

● Email replies on recruiter mails to job seekers.

● Automatic comments to job seeker applies

● Direct referral applies (refer slide-10)

● Calendar invite acceptance statistics

Other possible use cases:

● Parsing attachments sent in the mailers, like ID proofs, receipts, invoices etc.

● Getting referrer id from the registration mail of some gaming application, to give

extra points to the referrer

Page 14: Inbound Emails for Every Web App: Angle

Stay tuned on

https://engineering.naukri.com