Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Integrated personal email gateway (GSoC'17) #7342

Merged
merged 65 commits into from
Aug 22, 2017

Conversation

pkgodara
Copy link
Contributor

@pkgodara pkgodara commented Jun 26, 2017

PR for project under Google Summer of Code, 2017.

Enable direct email reply. For more features, see below.

Features Implemented:

Idea: The basic idea is to sub-address Reply-To email such that message information can be gathered.

If email address is local@domain then the address local+tag@domain denotes same delivery address local@domain but contains extra tag (We used it).

  • Why Sub-addressing? Easiest way to preserve some information tag throughout email replies & is supported by several email services including Runbox (plus), Gmail (plus), Yahoo! Mail Plus (hyphen), Apple's iCloud (plus), Outlook.com (plus), FastMail (plus and Subdomain Addressing), MMDF (equals), Qmail and Courier Mail Server (hyphen). As I observed, many companies including Github itself utilises this method to enable direct replies.

All messages sent by email would contain an icon (displayed in below image) along-side message action button.

screenshot from 2017-07-14 22-39-27

screenshot from 2017-07-24 09-18-35

Not done in this PR

  • Email attachments are not supported.

Closes #6129, #6118, #7601

Not sure about #4384, #4078

@RocketChat RocketChat deleted a comment Jun 26, 2017
@RocketChat RocketChat deleted a comment Jun 26, 2017
@RocketChat RocketChat deleted a comment Jun 26, 2017
@RocketChat RocketChat deleted a comment Jun 26, 2017
@RocketChat RocketChat deleted a comment Jun 26, 2017
function getEmails(imap) {
imap.search(['UNSEEN'], function(err, newEmails) {
if (err) {
console.log(err);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you return after the console.log? If error exists newEmails will be empty probably and the next if will throw an exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its there until I'm testing it, so that its easier for me to test/debug, would remove it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should throw an error here.

@RocketChat RocketChat deleted a comment Jul 2, 2017
@RocketChat RocketChat deleted a comment Jul 2, 2017
@RocketChat RocketChat deleted a comment Jul 2, 2017
@RocketChat RocketChat deleted a comment Aug 12, 2017
@RocketChat RocketChat deleted a comment Aug 12, 2017
@RocketChat RocketChat deleted a comment Aug 12, 2017
@localguru
Copy link
Contributor

Nice! Are attachments supported?

@pkgodara
Copy link
Contributor Author

@localguru Thanks. As par now only text is supported. I'm planning to support attachments in near future after it is successfully tested.

@rodrigok rodrigok added this to the 0.59.0 milestone Aug 22, 2017
@pkgodara pkgodara changed the title [WIP] Integrated personal email gateway. [NEW] Integrated personal email gateway (GSoC'17) Aug 22, 2017
@@ -1133,6 +1133,8 @@
"Offline_form": "Offline formulář",
"Offline_form_unavailable_message": "Zpráva nedostupného offline formuláře",
"Offline_Link_Message": "PŘEJÍT NA ZPRÁVU",
"Offline_Mention_Email": "Zmínka od __user__ v #__room__",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to remove these two lines. Offline_Mention_Email & Offline_Mention_All_Email. These has been changed to https://github.com/RocketChat/Rocket.Chat/pull/7342/files#diff-900a71156bf66b90776f869f3f63ccd9R1191 as subjects are moved to settings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do it later sometime.

@SimonBin
Copy link

SimonBin commented Jan 8, 2018

@pkgodara hi, how difficult would it be to bypass the requirement of direct mail server access and make a command line tool available? Then it also does not need to poll. I take this idea from RequestTracker, basically a small script/command that translates email on stdin to a webhook: https://docs.bestpractical.com/rt/4.4.0/rt-mailgate.html#SETUP

});
});

imap.once('error', function(err) {
Copy link

@gelinger777 gelinger777 May 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imap.once('error', function(err) {
		console.log(err);
	});  

can it be that it should be

imap.once('error', function(err) {
  	console.log(err);
imap.connect(); ???
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants