mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Website: Deliver contact form messages to Slack (#22231)
Related to: https://github.com/fleetdm/confidential/issues/8098 Changes: - Updated `deliver-contact-form-message` to send contact form submissions to a Slack webhook.
This commit is contained in:
parent
9a1b3769c8
commit
ebb62af6d9
1 changed files with 3 additions and 20 deletions
|
|
@ -66,26 +66,9 @@ module.exports = {
|
|||
throw 'invalidEmailDomain';
|
||||
}
|
||||
|
||||
// await sails.helpers.http.post(sails.config.custom.slackWebhookUrlForContactForm, {
|
||||
// text: `New contact form message: (Remember: we have to email back; can't just reply to this thread.) cc @sales `+
|
||||
// `Name: ${firstName + ' ' + lastName}, Email: ${emailAddress}, Message: ${message ? message : 'No message.'}`
|
||||
// });
|
||||
|
||||
await sails.helpers.sendTemplateEmail.with({
|
||||
to: sails.config.custom.fromEmailAddress,
|
||||
replyTo: {
|
||||
name: firstName + ' '+ lastName,
|
||||
emailAddress: emailAddress,
|
||||
},
|
||||
subject: 'New contact form message',
|
||||
layout: false,
|
||||
template: 'email-contact-form',
|
||||
templateData: {
|
||||
emailAddress,
|
||||
firstName,
|
||||
lastName,
|
||||
message,
|
||||
},
|
||||
await sails.helpers.http.post(sails.config.custom.slackWebhookUrlForContactForm, {
|
||||
text: `New contact form message: (Remember: we have to email back; can't just reply to this thread.)`+
|
||||
`Name: ${firstName + ' ' + lastName}, Email: ${emailAddress}, Message: ${message ? message : 'No message.'}`
|
||||
});
|
||||
|
||||
sails.helpers.salesforce.updateOrCreateContactAndAccount.with({
|
||||
|
|
|
|||
Loading…
Reference in a new issue