This repository has been archived on 2025-02-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cavecomm/src/emailTemplateCollection.cpp
Tina_Azure 3237b2af38 RFC 28822 compliance changes.
Move Mail Functionality into smtpManager.cpp
2023-05-29 15:12:40 +02:00

24 lines
1.0 KiB
C++

#ifndef EMAIL_TEMPLATE_COLLECTION_CPP
#define EMAIL_TEMPLATE_COLLECTION_CPP
#include <string>
namespace EmailTemplateCollection {
static const std::string PASSWORD_RESET_EMAIL_SUBJECT = "Password Reset";
static const std::string HTML_HEADER = "<!DOCTYPE html><html><body>";
static const std::string HTML_FOOTER = "</body></html>";
std::string passwordResetEmail(const std::string& domain, const std::string& email, const std::string& passwordResetKey) {
std::string emailContent;
emailContent = "<h1>Password Reset</h1><br>";
emailContent += "If you have requested the Password Reset for the following email: " + email + "<br>";
emailContent += "please follow the following link: ";
emailContent += R"(<a href=")";
emailContent += domain + "/PasswordReset/" + passwordResetKey;
emailContent += R"(">Password Reset.</a><br>)";
emailContent += "If you haven't requested this PasswordReset please ignore this email";
return emailContent;
}
}
#endif