ticket #3 - Added learning cartridge with all complete examples

This commit is contained in:
Max Gialanella
2021-12-22 11:09:55 -07:00
parent 8f15cd15df
commit 3f354195f2
33 changed files with 783 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
'use strict';
function sendNotificationsChange(emailAddress) {
var Mail = require('dw/net/Mail');
var Site = require('dw/system/Site');
var Template = require('dw/util/Template');
var HashMap = require('dw/util/HashMap');
var context = new HashMap();
var email = new Mail();
var template = new Template('notificationchangeemail');
email.addTo(emailAddress);
email.setFrom(Site.current.getCustomPreferenceValue('customerServiceEmail') || 'no-reply@salesforce.com');
email.setSubject('Notification Settings Changed');
email.setContent(template.render(context).text, 'text/html', 'UTF-8');
email.send();
}
module.exports = {
sendNotificationsChange: sendNotificationsChange
};