-
-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
174 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,55 +34,55 @@ export async function sendAssignedEmail(email: any) { | |
|
||
console.log("Sending email to: ", email); | ||
|
||
let info = await mail.sendMail({ | ||
from: '"No reply 👻" [email protected]', // sender address | ||
to: email, // list of receivers | ||
subject: `A new ticket has been assigned to you`, // Subject line | ||
text: `Hello there, a ticket has been assigned to you`, // plain text body | ||
html: ` | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" /> | ||
</head> | ||
<div id="" style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0">Ticket Created<div></div> | ||
</div> | ||
await mail | ||
.sendMail({ | ||
from: "[email protected]", // sender address | ||
to: email, // list of receivers | ||
subject: `A new ticket has been assigned to you`, // Subject line | ||
text: `Hello there, a ticket has been assigned to you`, // plain text body | ||
html: ` | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" /> | ||
</head> | ||
<div id="" style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0">Ticket Created<div></div> | ||
</div> | ||
<body style="background-color:#ffffff;margin:0 auto;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif"> | ||
<table align="center" role="presentation" cellSpacing="0" cellPadding="0" border="0" width="100%" style="max-width:600px;margin:0 auto"> | ||
<tr style="width:100%"> | ||
<td> | ||
<table style="margin-top:8px" align="center" border="0" cellPadding="0" cellSpacing="0" role="presentation" width="100%"> | ||
</table> | ||
<h1 style="color:#1d1c1d;font-size:16px;font-weight:700;margin:10px 0;padding:0;line-height:42px">Ticket Created</h1> | ||
<p style="font-size:20px;line-height:28px;margin:4px 0"> | ||
<p>Hello, <br>Your ticket has now been created and logged.</p> | ||
<p style="font-size:14px;margin:16px 0;color:#000"> | ||
Kind regards, | ||
<body style="background-color:#ffffff;margin:0 auto;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif"> | ||
<table align="center" role="presentation" cellSpacing="0" cellPadding="0" border="0" width="100%" style="max-width:600px;margin:0 auto"> | ||
<tr style="width:100%"> | ||
<td> | ||
<table style="margin-top:8px" align="center" border="0" cellPadding="0" cellSpacing="0" role="presentation" width="100%"> | ||
</table> | ||
<h1 style="color:#1d1c1d;font-size:16px;font-weight:700;margin:10px 0;padding:0;line-height:42px">Ticket Assigned</h1> | ||
<p style="font-size:20px;line-height:28px;margin:4px 0"> | ||
<p>Hello, <br>A new ticket has been assigned to you.</p> | ||
<p style="font-size:14px;margin:16px 0;color:#000"> | ||
Kind regards, | ||
<table align="center" border="0" cellPadding="0" cellSpacing="0" role="presentation" width="100%"> | ||
<tbody> | ||
<tr> | ||
<td> | ||
<a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://slackhq.com" rel="noopener noreferrer">Our blog</a> | <a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://slack.com/legal" rel="noopener noreferrer">Documentation</a> | <a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://slack.com/help" rel="noopener noreferrer">Discord</a> </a> | ||
<p style="font-size:12px;line-height:15px;margin:16px 0;color:#b7b7b7;text-align:left">This was an automated message sent by peppermint.sh -> An open source helpdesk solution</p> | ||
<p style="font-size:12px;line-height:15px;margin:16px 0;color:#b7b7b7;text-align:left;margin-bottom:50px">©2022 Peppermint Ticket Management, a Peppermint Labs product.<br />All rights reserved.</p> | ||
</td> | ||
</tr> | ||
</tbody> | ||
<table align="center" border="0" cellPadding="0" cellSpacing="0" role="presentation" width="100%"> | ||
<tbody> | ||
<tr> | ||
<td> | ||
<a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://docs.peppermint.sh" rel="noopener noreferrer">Documentation</a> | <a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://discord.gg/8XFkbgKmgv" rel="noopener noreferrer">Discord</a> </a> | ||
<p style="font-size:12px;line-height:15px;margin:16px 0;color:#b7b7b7;text-align:left">This was an automated message sent by peppermint.sh -> An open source helpdesk solution</p> | ||
<p style="font-size:12px;line-height:15px;margin:16px 0;color:#b7b7b7;text-align:left;margin-bottom:50px">©2022 Peppermint Ticket Management, a Peppermint Labs product.<br />All rights reserved.</p> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> | ||
`, | ||
}); | ||
|
||
console.log("Message sent: %s", info.messageId); | ||
|
||
// Preview only available when sending through an Ethereal account | ||
console.log("Preview URL: %s", nodeMailer.getTestMessageUrl(info)); | ||
</body> | ||
</html> | ||
`, | ||
}) | ||
.then((info) => { | ||
console.log("Message sent: %s", info.messageId); | ||
}) | ||
.catch((err) => console.log(err)); | ||
} | ||
} catch (error) { | ||
console.log(error); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,59 +38,57 @@ export async function sendComment( | |
}); | ||
} | ||
|
||
console.log("Sending email to: ", email); | ||
await mail | ||
.sendMail({ | ||
from: '"No reply 👻" [email protected]', // sender address | ||
to: email, | ||
subject: `New comment on a ticket`, // Subject line | ||
text: `Hello there, Ticket: ${title}, has had an update with a comment of ${comment}`, // plain text body | ||
html: ` | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html lang="en"> | ||
let info = await mail.sendMail({ | ||
from: '"No reply 👻" [email protected]', // sender address | ||
to: email, | ||
subject: `New comment on a ticket`, // Subject line | ||
text: `Hello there, Ticket ${title}, has had an update with a comment of ${comment}`, // plain text body | ||
html: ` | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" /> | ||
</head> | ||
<div id="" style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0">Ticket Created<div></div> | ||
</div> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" /> | ||
</head> | ||
<div id="" style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0">Ticket Created<div></div> | ||
</div> | ||
<body style="background-color:#ffffff;margin:0 auto;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif"> | ||
<table align="center" role="presentation" cellSpacing="0" cellPadding="0" border="0" width="100%" style="max-width:600px;margin:0 auto"> | ||
<tr style="width:100%"> | ||
<td> | ||
<table style="margin-top:8px" align="center" border="0" cellPadding="0" cellSpacing="0" role="presentation" width="100%"> | ||
</table> | ||
<h1 style="color:#1d1c1d;font-size:16px;font-weight:700;margin:10px 0;padding:0;line-height:42px">Ticket Update for: ${title}</h1> | ||
<p style="font-size:20px;line-height:28px;margin:4px 0"> | ||
<p>${comment}</p> | ||
<p style="font-size:14px;margin:16px 0;color:#000"> | ||
Kind regards, | ||
<body style="background-color:#ffffff;margin:0 auto;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif"> | ||
<table align="center" role="presentation" cellSpacing="0" cellPadding="0" border="0" width="100%" style="max-width:600px;margin:0 auto"> | ||
<tr style="width:100%"> | ||
<td> | ||
<table style="margin-top:8px" align="center" border="0" cellPadding="0" cellSpacing="0" role="presentation" width="100%"> | ||
<table align="center" border="0" cellPadding="0" cellSpacing="0" role="presentation" width="100%"> | ||
<tbody> | ||
<tr> | ||
<td> | ||
<a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://docs.peppermint.sh" rel="noopener noreferrer">Documentation</a> | <a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://discord.gg/8XFkbgKmgv" rel="noopener noreferrer">Discord</a> </a> | ||
<p style="font-size:12px;line-height:15px;margin:16px 0;color:#b7b7b7;text-align:left">This was an automated message sent by peppermint.sh -> An open source helpdesk solution</p> | ||
<p style="font-size:12px;line-height:15px;margin:16px 0;color:#b7b7b7;text-align:left;margin-bottom:50px">©2022 Peppermint Ticket Management, a Peppermint Labs product.<br />All rights reserved.</p> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
<h1 style="color:#1d1c1d;font-size:16px;font-weight:700;margin:10px 0;padding:0;line-height:42px">Ticket Update:</h1> | ||
<p style="font-size:20px;line-height:28px;margin:4px 0"> | ||
<p>${comment}</p> | ||
<p style="font-size:14px;margin:16px 0;color:#000"> | ||
Kind regards, | ||
</body> | ||
<table align="center" border="0" cellPadding="0" cellSpacing="0" role="presentation" width="100%"> | ||
<tbody> | ||
<tr> | ||
<td> | ||
<a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://slackhq.com" rel="noopener noreferrer">Our blog</a> | <a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://slack.com/legal" rel="noopener noreferrer">Documentation</a> | <a target="_blank" style="color:#b7b7b7;text-decoration:underline" href="https://slack.com/help" rel="noopener noreferrer">Discord</a> </a> | ||
<p style="font-size:12px;line-height:15px;margin:16px 0;color:#b7b7b7;text-align:left">This was an automated message sent by peppermint.sh -> An open source helpdesk solution</p> | ||
<p style="font-size:12px;line-height:15px;margin:16px 0;color:#b7b7b7;text-align:left;margin-bottom:50px">©2022 Peppermint Ticket Management, a Peppermint Labs product.<br />All rights reserved.</p> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> | ||
`, | ||
}); | ||
|
||
console.log("Message sent: %s", info.messageId); | ||
|
||
// Preview only available when sending through an Ethereal account | ||
console.log("Preview URL: %s", nodeMailer.getTestMessageUrl(info)); | ||
</html> | ||
`, | ||
}) | ||
.then((info) => { | ||
console.log("Message sent: %s", info.messageId); | ||
}) | ||
.catch((err) => console.log(err)); | ||
} | ||
} catch (error) { | ||
console.log(error); | ||
|
Oops, something went wrong.