Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/server/components/utils/index.js b/server/components/utils/index.js
- index 07919ddf..e7d5452f 100644
- --- a/server/components/utils/index.js
- +++ b/server/components/utils/index.js
- @@ -51,8 +51,7 @@ util.initBase = function (){
- });
- keyVault.getSecret(config.sendGridConfigKey, function (_sendGridConfig) {
- -
- - sendGridConfig = {"apiKey":"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"};
- + sendGridConfig = JSON.parse(_sendGridConfig.value);
- sgMail.setApiKey(sendGridConfig.apiKey);
- }
- );
- @@ -112,10 +111,6 @@ util.sendEmail = function(options, user){
- };
- }
- - console.log('-------------------------------------');
- - console.log('mailOptions', mailOptions);
- - console.log('-------------------------------------');
- -
- return sgMail.send(mailOptions).then(()=>{
- logger('info',`mail sent successfully to ${mailOptions.to}`, user);
- })
- diff --git a/server/config/environment/index.js b/server/config/environment/index.js
- index 40432828..d4f49e9c 100644
- --- a/server/config/environment/index.js
- +++ b/server/config/environment/index.js
- @@ -100,7 +100,7 @@ var all = {
- //sendgrid config key
- sendGridConfigKey:"sendgrid-config",
- - mailSandboxMode:false,//set this to false if you want to actually send emails via sendGrid from your environment
- + mailSandboxMode:true,//set this to false if you want to actually send emails via sendGrid from your environment
- domain: process.env.DOMAIN || 'processgridappqa.com',
- diff --git a/server/services/salesforce/salesforceConnectionFactory.js b/server/services/salesforce/salesforceConnectionFactory.js
- index 669a8ec8..3333b340 100644
- --- a/server/services/salesforce/salesforceConnectionFactory.js
- +++ b/server/services/salesforce/salesforceConnectionFactory.js
- @@ -182,15 +182,11 @@ salesforceConnectionFactory.insertLeadInLMO = function(user){
- let LMOLoginObj = JSON.parse(config.LMOLogin);
- - console.log('-------------------------------------');
- - console.log('LMOLoginObj', LMOLoginObj);
- - console.log('-------------------------------------');
- -
- return sfConn.soapLogin({
- hostname: LMOLoginObj.hostname,
- apiVersion: salesforceConnectionFactory.salesforceAPIVersion,
- - username: /*LMOLoginObj.username,*/ 'appbuddy_info@appbuddy.com.CopyRecord',
- - password: /*LMOLoginObj.password + LMOLoginObj.securityToken*/ 'BigSales2018$$' + '7avzxGnoAkP278xyCoBPH3THy',
- + username: LMOLoginObj.username,
- + password: LMOLoginObj.password + LMOLoginObj.securityToken
- }).then(soapConnection=>{
- logger('info','* services.salesforce.salesforceConnectionFactory.insertLeadInLMO: successfully created new soap connection', user);
- @@ -278,15 +274,12 @@ salesforceConnectionFactory.activateLeadInLMO = function(user){
- let leadToActivate = {
- '$type': 'Lead',
- 'ABC_Activated__c': 'true',
- - 'Id': user.email
- + 'Id': user.LMOLeadId
- };
- // Update the Lead in the LMO
- return sfConn.soap(partnerWsdl, 'update', {sObjects: [leadToActivate]})
- .then(result =>{
- - console.log('-------------------------------------');
- - console.log('result', result);
- - console.log('-------------------------------------');
- return sfConn;
- });
Add Comment
Please, Sign In to add comment