I've built a CRM webapp with Django for a specific lead heavy industry. It's working for both gmail and outlook users. Through MsGraph and Google API, the user is able to give authorization via Oath2 to the app to access their inboxes. The app then grabs and parses emails from various sources.
Each lead source always sends the lead emails with same subject. This makes the lead emails easy to identify from the users inbox. Unfortunately, the subject of EVERY email that comes in has to be searched to find the desired lead emails. Unfortunately, Identifying by sender isn't an option, and wouldn't change the issue. Each email would still have to be searched.
I have a couple of colleagues beta testing right now.
As I think about taking on new users that may be outside of my colleagues, I am starting to think the webapps unrestricted access to a user's inbox via the available scopes isn't the best approach for trying to attract new users. I would be suspicious of any 3rd party program wanting to access all of my emails, even if just searching for specific emails.
I use Google's watch() and MsGraphs subscriptions to do this while the user is offline. It doesn't appear that Google or Microsoft allow for any kind of message change filter based on what's in the subject line.
Are there any methods that I have not been able to find in either Google API or MsGraph documentation that would limit access to only the emails that meet the subject search criteria?
Would this even pass either of their security checks to get 'Published Status.'
Reading through the Google docs, it looks like you can set authorization scopes that limit access to just labels and basic settings. This should allow you to filter messages by subject and apply labels to those filters.
Of course, the subject filtering doesn't have anything to do with authorization. But fine tuning the authorization is better than allowing write access to an entire mailbox.
I would say in general, the more open the permissions are, the less likely you are to get approved. Google wants you to only have access to what you need to achieve the product's purpose, nothing more.
https://developers.google.com/gmail/api/auth/scopes
There definitely isn't a way to set custom permissions based on subject. In fact, I don't know many APIs in general that allow you to define custom permissions that granularly.
That said, it doesn't seem like you even need read access to message headers, let alone message body content, to achieve what you want to do in Gmail.
I assume Microsoft has similar scoping, but I'm not sure.
I am developing a Django-based system. It is kind of client-tracking tool.
Some users can work with different client accounts.
I would like to track the emails among users and clients within the application.
The company uses MS Outlook Server as a mail server and users are sending emails from their workstations.
The goal is to have the list of emails to/from users/client on the web page.
I see some possible ways how to do this.
Make the email form on the web page and send all emails from this page. Thus we can store the email sent.
While sending the email - manually add a CC field with the address of robot who will have access to this mail thread and can fetch messages from the inbox sorting them by the sender/recipients.
Automatically fetch messages from user mailboxes (don't want to store their passwords though)
Probably use some mail filter on the mail server to forward messages from/to specified address (don't know how to do this)
But maybe someone can give some advices? Any ideas, guys?
I had done something similar a couple years ago (with Postfix, however, not with MS Exchange).
The best approach IMO is to setup a mailserver to blind-copy each email to your script. In Postfix this called a "custom transport". This way your clients will be able to send emails using any program, not necessary through a web form. AFAIK, nearly all production email archiving solutions work that way.
Sounds like you are looking for something like the journaling feature in microsoft exchange-server. It allows you to define a special mailbox that will recieve a copy of all mails. You can find more information about this here, here and here
Once all the messages are in one mailbox you can access it from your application.
I'm looking for a way for users to message each other via the website, with their own inbox, sent, etc folders, and to receive and reply to these messages via email as well. The email addresses used for replying are generated by the app to hide user's real emails. The app sits in the middle of the two users via the site and via email.
Both django-messages and django-postman give very little information about what email-related features they have. Can either do this, or is there an alternative?
Thanks
django-messages includes pretty much all you asked for including inbox, outbox, trash and many more goodies
django-postman seems even better and is in active development
try out these packages they both include documentation.
Today our website emails the user for every "event" who needs to be notified, but the number of "notifications" is becoming huge, annoying our users with tons of daily emails. Instead, I want to aggregate the notifications and send only one email every day.
I found this project, who seems to be exactly what I need: http://code.google.com/p/django-mailer/
A reusable Django app for queuing and throttling of email sending, scheduled sending, consolidation of multiple notifications into single emails and logging of mail failures.
Sample Use Cases:
(...)
a user doesn't want individual emails for each notification but wants them in digest form (e.g. a daily digest of new posts or a weekly update on friends who have joined)
(...)
NOTE: Now moved to http://github.com/jtauber/django-mailer/
Looks cool, but there are no code at all doing this at the Github repo and there are no more code at Google Code.
Do you know some alternative? (other than code it myself)
You'll need some service running in the background, otherwise what would trigger the email batch? I would use django celery email to do this. You'll need to set up celery first.
Description of how a webhook works from http://webhooks.pbwiki.com/ -
How do they work?
By letting the user specify a URL for various events, the application will POST data to those URLs when the events occur...Among other things, you can:
create notifications to you or anybody via email, IRC, Jabber, ...
put the data in another app (real-time data synchronization)
process the data and repost it using the app's API
validate the data and potentially prevent it from being used by the app
Who is using web hooks?
DevjaVu, BitBucket, GitHub, Shopify, Versionshelf, PayPal (IPN), Jott (Links), IMified, PBwiki, Facebook (Platform, sort of), Mailhook.org, SMTP2Web, Astrotrain, Notifixious, Assembla, ZenDesk, Google Code
Do you know of any good uses of webhooks?
AlertGrid is the webhook consumer. You can configure it to accept http calls from ANY source and raise alert (email, sms, phone) to a specified person or group of people (works worldwide!) whenever the parameters in the http callback meet your criteria or when the http call was expected but it didn't occur (kind of 'heartbeat' monitoring). There is a visual editor for you to easily create rules.
Apart from notifying people by sms or email it can also notify existing applications by sending the http requests to their APIs.
It can also visualise data received in http callbacks and show the history.
Unfortunately, the wiki is not the most up to date list of known implementations. I have my own list that I'll put on the wiki when I get around to reorganizing it. Some not mentioned in the current list:
Dropbox
Gnip
Google Code (Project Hosting)
Checkout by Amazon (both for notifications and as actual callbacks with return data)
Hubilicious
Beanstalk
Google Checkout
MailChimp
SurveyGizmo
Hey!Watch
MySpace (for app developers)
I know shopify is using webhooks quite successfully now. By extension so is fetchapp uses them as well. You either are sending an xml file, or receiving one and doing your own processing logic on it.
Oh and shopify's wiki in the link has a whole write up about how to implement it in your app.
OfficeAutopilot has an interesting version of webhooks.. they use their rule interface to trigger API posts. Can trigger in response to any system event.. email opens, clicks, page visits, purchases, etc, etc.
Kiln 1.2 uses webhooks much like GitHub, BitBucket, etc.
(Disclaimer: I'm a Kiln/FogBugz dev.)
Say for example you want to get data from any API( eg. twitter, facebook etc.,). Instead of you polling the data for every few minutes/seconds, it POSTS the data to the specified URL, whenever it is available.
By using this, you will avoid unnecessary polling like say you poll and data is not there yet.
StorageRoom is a JSON-based CMS that supports webhooks, so that you can notify other services or kick of some manual processing on your own servers.
(Please note: I created the service myself)
If you want to connect one service that supports webhooks to another service's API, you can check out IronWorker's webhook support. Here's a blog post that walks through connecting github webhooks to HipChat:
http://blog.iron.io/2012/04/one-webhook-to-rule-them-all-one-url.html
There are some other examples here too, one that takes a chargify callback and posts to Campfire.