1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-25 18:32:20 -05:00

Link PGP key in plaintext suffix

This commit is contained in:
Tankred Hase 2014-07-29 14:13:00 +02:00
parent 45d40d5d37
commit 746c06e24a
4 changed files with 10 additions and 4 deletions

View File

@ -106,7 +106,7 @@ define(function(require) {
invitationSubject: 'Invitation to a private conversation',
invitationMessage: 'Hi,\n\nI use Whiteout Mail to send and receive encrypted email. I would like to exchange encrypted messages with you as well.\n\nPlease install the Whiteout Mail application. This application makes it easy to read and write messages securely with PGP encryption applied.\n\nGo to the Whiteout Networks homepage to learn more and to download the application: https://whiteout.io\n\n',
message: 'Hi,\n\nthis is a private conversation. To read my encrypted message below, simply open it in Whiteout Mail.\nOpen Whiteout Mail: https://chrome.google.com/webstore/detail/jjgghafhamholjigjoghcfcekhkonijg\n\n\n',
signature: '\n\n\n--\nSent from Whiteout Mail - Email encryption for the rest of us\nhttps://whiteout.io\n\n',
signature: '\n\n\n--\nSent from Whiteout Mail - Email encryption for the rest of us: https://whiteout.io\n\nMy PGP key: ',
webSite: 'http://whiteout.io',
verificationSubject: '[whiteout] New public key uploaded',
sendBtnClear: 'Send',

View File

@ -369,7 +369,7 @@ define(function(require) {
cc: $scope.cc.filter(filterEmptyAddresses),
bcc: $scope.bcc.filter(filterEmptyAddresses),
subject: $scope.subject.trim() ? $scope.subject.trim() : str.fallbackSubject, // Subject line, or the fallback subject, if nothing valid was entered
body: $scope.body.trim() + (!$scope.sendBtnSecure ? str.signature : ''), // use parsed plaintext body
body: $scope.body.trim(), // use parsed plaintext body
attachments: $scope.attachments,
sentDate: new Date(),
headers: {}

View File

@ -1024,6 +1024,10 @@ define(function(require) {
return;
}
self.busy();
// add suffix to plaintext mail
options.email.body += str.signature + config.cloudUrl + '/' + self._account.emailAddress;
// mime encode, sign and send email via smtp
self._pgpMailer.send({
smtpclient: options.smtpclient, // filled solely in the integration test, undefined in normal usage

View File

@ -9,7 +9,9 @@ define(function(require) {
appController = require('js/app-controller'),
mailreader = require('mailreader'),
openpgp = require('openpgp'),
PgpMailer = require('pgpmailer');
PgpMailer = require('pgpmailer'),
config = require('js/app-config').config,
str = require('js/app-config').string;
describe('Email DAO integration tests', function() {
this.timeout(100000);
@ -868,7 +870,7 @@ define(function(require) {
expect(message.signed).to.be.true;
expect(message.signaturesValid).to.be.true;
expect(message.attachments.length).to.equal(0);
expect(message.body).to.equal(expectedBody);
expect(message.body).to.equal(expectedBody + str.signature + config.cloudUrl + '/' + testAccount.user);
done();
});
};