Closed LiamMahoney closed 1 year ago
I think I want to try and crate a dynamic form component. Form would keep track of all the input children, handle submissions.
Possible states of a form's input:
missing any?
Actually I need to stop being dumb and try to use HTML forms
Left off working on implementing form notifications.
TODO:
Service Account generated
Believe I have nodemailer setup properly but getting the following error when trying to send an email.
Error: Missing credentials for "PLAIN"
at SMTPConnection._formatError (/Users/liam/Documents/code/web/websites/online_impact/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)
Turns out I had been providing the wrong value for the type
of the auth
object in the nodemailer Transport object..
let transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth: {
type: "OAuth2",
user: process.env.USER_EMAIL,
serviceClient: process.env.SVC_ACCT_CLIENT,
privateKey: fs.readFileSync(process.env.SVC_ACCT_PRIV_KEY)
}
});
But now getting authentication error -
Error: unauthorized_client: Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.
Took me way longer than it should've. Ended up with what feels like a janky solution but it should work fine.
Original message:
TODO: