This repository was archived by the owner on Dec 14, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 2
2
var path = require ( 'path' ) ;
3
3
var CpTranslations = require ( 'cp-translations' ) ;
4
4
5
- var generator = require ( 'xoauth2' ) . createXOAuth2Generator ( {
6
- user : process . env . GMAIL_USER ,
7
- clientId : process . env . GMAIL_CLIENT_ID ,
8
- clientSecret : process . env . GMAIL_CLIENT_SECRET ,
9
- refreshToken : process . env . GMAIL_REFRESH_TOKEN
10
- } ) ;
11
-
12
5
module . exports = function ( options ) {
13
6
function pgConfig ( ) {
14
7
return {
@@ -45,15 +38,18 @@ module.exports = function (options) {
45
38
}
46
39
}
47
40
} ,
48
- gmail : {
41
+ email : {
49
42
folder : path . resolve ( CpTranslations . getEmailTemplatePath ( ) ) ,
50
43
config : {
51
- service : 'gmail' ,
44
+ pool : true ,
45
+ service : 'sendgrid' ,
52
46
auth : {
53
- xoauth2 : generator
47
+ user : process . env . MAIL_USER ,
48
+ pass : process . env . MAIL_PASS
54
49
}
55
50
}
56
51
} ,
52
+
57
53
'recaptcha_secret_key' : process . env . RECAPTCHA_SECRET_KEY || '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe' ,
58
54
transport : {
59
55
type : 'web' ,
@@ -67,7 +63,7 @@ module.exports = function (options) {
67
63
coderdojoadultforums : { code : process . env . CODERDOJO_ADULT_FORUMS_SECRET || 'ilikecode' ,
68
64
baseUrl : process . env . ADULT_FORUM + '/auth/CoderDojo/callback' } ,
69
65
coderdojoyouthforums : { code : process . env . CODERDOJO_YOUTH_FORUMS_SECRET || 'ilikecode' ,
70
- baseUrl : process . env . YOUTH_FORUM + '/auth/CoderDojo/callback' }
66
+ baseUrl : process . env . YOUTH_FORUM + '/auth/CoderDojo/callback' }
71
67
}
72
68
} ,
73
69
nodebb : {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ seneca.use(store, config['postgresql-store']);
22
22
if ( process . env . MAILTRAP_ENABLED === 'true' ) {
23
23
seneca . use ( 'mail' , config . mailtrap ) ;
24
24
} else {
25
- seneca . use ( 'mail' , config . gmail ) ;
25
+ seneca . use ( 'mail' , config . email ) ;
26
26
}
27
27
28
28
function shutdown ( err ) {
You can’t perform that action at this time.
0 commit comments