Skip to content

Commit

Permalink
minor: STUD-196 Implement "Released" email notification
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-software-developer committed Jul 22, 2024
1 parent d1f14c9 commit f13ecb1
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ internal class SongRepositoryImpl(
MintingStatus.Released -> {
logger.info { "Released song $songId SUCCESS!" }
// TODO: Maybe send an email once the song is live on spotify.
// sendMintingNotification("released", songId)
sendMintingNotification("released", songId)
}

else -> Unit
Expand Down
5 changes: 5 additions & 0 deletions newm-server/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ mintingNotifications {
messageUrl = "/email/mint-declined.html"
messageUrl = ${?EMAIL_MINT_DECLINED_MESSAGE_URL}
}
released {
subject = "[IMPORTANT] Your song has been released! \n Preview: Now available on all major streaming platforms"
messageUrl = "/email/mint-released.html"
messageUrl = ${?EMAIL_MINT_RELEASED_MESSAGE_URL}
}
}

nftCdn {
Expand Down
35 changes: 35 additions & 0 deletions newm-server/src/main/resources/email/mint-released.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><title></title><!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]--><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><style type="text/css">#outlook a { padding:0; }
body { margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%; }
table, td { border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt; }
img { border:0;height:auto;line-height:100%; outline:none;text-decoration:none;-ms-interpolation-mode:bicubic; }
p { display:block;margin:13px 0; }</style><!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]--><!--[if lte mso 11]>
<style type="text/css">
.mj-outlook-group-fix { width:100% !important; }
</style>
<![endif]--><!--[if !mso]><!--><link href="https://fonts.googleapis.com/css?family=Inter" rel="stylesheet" type="text/css"><style type="text/css">@import url(https://fonts.googleapis.com/css?family=Inter);</style><!--<![endif]--><style type="text/css">@media only screen and (min-width:480px) {
.mj-column-per-100 { width:100% !important; max-width: 100%; }
}</style><style media="screen and (min-width:480px)">.moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; }</style><style type="text/css">@media only screen and (max-width:480px) {
table.mj-full-width-mobile { width: 100% !important; }
td.mj-full-width-mobile { width: auto !important; }
}</style></head><body style="word-spacing:normal;background-color:#000000;"><div style="display:none;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">Head to your NEWM Studio for more details</div><div style="background-color:#000000;"><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:800px;" width="800" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:800px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:0 40px;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:720px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td style="vertical-align:top;padding:0 0;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td align="left" style="font-size:0px;padding:0 0;padding-top:100px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"><tbody><tr><td style="width:150px;"><img height="auto" src="https://res.cloudinary.com/newm/image/upload/f_auto,q_auto/v1/newmserver-emails/j0hw1ggc1damiefj0uju" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="150"></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:800px;" width="800" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:800px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:0 40px;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:720px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td style="vertical-align:top;padding:0 0;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td align="left" style="font-size:0px;padding:0 0;padding-top:80px;word-break:break-word;"><div style="font-family:Inter,sans-serif;font-size:32px;font-style:normal;font-weight:500;line-height:1;text-align:left;color:#FFFFFF;">Congrats {owner}!</div></td></tr><tr><td align="left" style="font-size:0px;padding:0 0;padding-top:24px;word-break:break-word;"><div style="font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:500;line-height:18px;text-align:left;color:#FFFFFF;">[IMPORTANT] Your song has been released!<br>Preview: Now available on all major streaming platforms<br></div></td></tr><tr>
<td align="left" style="font-size:0px;padding:0 0;padding-top:24px;word-break:break-word;">

<div style="font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:500;line-height:18px;text-align:left;color:#FFFFFF;">

Congrats [Fname]! Your track has been officially released and can now be found on all major streaming platforms.
<br><br>
[embed song, ISRC number & ownership share details]
<br><br>
Now that your song has been minted, distributed and released, it will begin accruing royalties for every stream. Please note that NEWM has no control over royalty distribution and timelines from third-party music streaming platforms. We recommend consulting each platform’s terms and conditions for more information on their royalty distribution policies.
<br>
All earnings, including streaming royalties, can be viewed in the wallet tab on your NEWM Studio account. Once your royalties are available, simply select “Claim now" to transfer your earnings to your designated external wallet.
<br><span style="color: #8E8E93">Please note that release times vary across different streaming platforms. However, if your song is still not listed on a particular streaming platform more than two days past your set release date,</span> or if you have any questions about the release process, please email <a href="mailto:[email protected]" style="color: #8E8E93">[email protected]</a> for assistance.<br><br>Cheers,The NEWM Team<br><br></td></tr><tr><td align="center" style="font-size:0px;padding:40px 0 60px 0;word-break:break-word;"><div style="font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:500;line-height:18px;text-align:center;color:#636366;">PLEASE DO NOT REPLY TO THIS MESSAGE</div></td></tr><tr><td style="background:var(--gradients-gradient-music, linear-gradient(53deg, #C341F0 0%, #F53C69 100%));font-size:0px;word-break:break-word;"><div style="height:1px;line-height:1px;">&#8202;</div></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:800px;" width="800" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:800px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:0 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:800px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td style="vertical-align:top;padding:0 0;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:0px 0px;padding-top:40px;word-break:break-word;"><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" ><tr><td><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;"><tr><td style="padding:20px 40px;vertical-align:middle;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:0;width:24px;"><tr><td style="font-size:0;height:24px;vertical-align:middle;width:24px;"><a href="https://t.me/NEWMofficial" target="_blank"><img height="24" src="https://res.cloudinary.com/newm/image/upload/f_auto,q_auto/v1/newmserver-emails/uguj3in5g8hg4ofrzdwq" style="border-radius:0;display:block;" width="24"></a></td></tr></table></td></tr></table><!--[if mso | IE]></td><td><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;"><tr><td style="padding:20px 40px;vertical-align:middle;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:0;width:24px;"><tr><td style="font-size:0;height:24px;vertical-align:middle;width:24px;"><a href="https://twitter.com/projectNEWM" target="_blank"><img height="24" src="https://res.cloudinary.com/newm/image/upload/f_auto,q_auto/v1/newmserver-emails/aqvu7wjkpymijdbjovhf" style="border-radius:0;display:block;" width="24"></a></td></tr></table></td></tr></table><!--[if mso | IE]></td><td><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;"><tr><td style="padding:20px 40px;vertical-align:middle;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:0;width:24px;"><tr><td style="font-size:0;height:24px;vertical-align:middle;width:24px;"><a href="https://discord.com/invite/z4sYqxqgvQ" target="_blank"><img height="24" src="https://res.cloudinary.com/newm/image/upload/f_auto,q_auto/v1/newmserver-emails/f8u1zdg6osweqmioeesl" style="border-radius:0;display:block;" width="24"></a></td></tr></table></td></tr></table><!--[if mso | IE]></td><td><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;"><tr><td style="padding:20px 40px;vertical-align:middle;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:0;width:24px;"><tr><td style="font-size:0;height:24px;vertical-align:middle;width:24px;"><a href="https://instagram.com/projectnewm.io" target="_blank"><img height="24" src="https://res.cloudinary.com/newm/image/upload/f_auto,q_auto/v1/newmserver-emails/at5dxsfeqpy30snybkw1" style="border-radius:0;display:block;" width="24"></a></td></tr></table></td></tr></table><!--[if mso | IE]></td><td><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;"><tr><td style="padding:20px 40px;vertical-align:middle;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:0;width:24px;"><tr><td style="font-size:0;height:24px;vertical-align:middle;width:24px;"><a href="https://github.com/projectNEWM" target="_blank"><img height="24" src="https://res.cloudinary.com/newm/image/upload/f_auto,q_auto/v1/newmserver-emails/l5w03sjsdw0bt0qpst8f" style="border-radius:0;display:block;" width="24"></a></td></tr></table></td></tr></table><!--[if mso | IE]></td><td><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;"><tr><td style="padding:20px 40px;vertical-align:middle;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:0;width:24px;"><tr><td style="font-size:0;height:24px;vertical-align:middle;width:24px;"><a href="https://www.youtube.com/channel/UCcsBNWGjIf8YarD9uaZEEvw" target="_blank"><img height="24" src="https://res.cloudinary.com/newm/image/upload/f_auto,q_auto/v1/newmserver-emails/vmvrwooaithktecqjd6p" style="border-radius:0;display:block;" width="24"></a></td></tr></table></td></tr></table><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:800px;" width="800" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:800px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:0 40px;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:720px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td style="vertical-align:top;padding:0 0;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:20px 0 53px 0;word-break:break-word;"><div style="font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:500;line-height:18px;text-align:center;color:#FFFFFF;">Join our community on <a href="https://discord.com/invite/z4sYqxqgvQ" style="color: #DC3CAA;text-decoration: none;font-weight: 700">Discord</a>!</div></td></tr><tr><td style="background:var(--greys-grey-400, #2C2C2E);font-size:0px;word-break:break-word;"><div style="height:1px;line-height:1px;">&#8202;</div></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:800px;" width="800" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:800px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:0 40px;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:720px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td style="vertical-align:top;padding:0 0;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:40px 0 62px 0;word-break:break-word;"><div style="font-family:Inter,sans-serif;font-size:12px;font-style:italic;font-weight:500;line-height:18px;text-align:center;color:#636366;">Copyright &copy; 2023 NEWM, All rights reserved</div></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></div></body></html>

0 comments on commit f13ecb1

Please sign in to comment.