Closed hwakabh closed 7 months ago
By applying changes of #79 to GKE cluster with directly using kubectl apply
from local, we could fix this issue now, and, as we can see the following logs/captures, confirmed that we can send email from production UI now.
24-03-20 23:32:07 git/6ow3idGirl [build/78/secrets] % stern -n 6ow3idgirl 'express'
+ express-5c54656c8-95pd4 › express
+ express-5c54656c8-bxxkg › express
+ express-5c54656c8-n74lb › express
# (...)
express-5c54656c8-bxxkg express {
express-5c54656c8-bxxkg express sender: { email: 'hwakabh@icloud.com', name: 'hwakabh' },
express-5c54656c8-bxxkg express to: [ { email: 'hrykwkbys1024@gmail.com', name: 'admin' } ],
express-5c54656c8-bxxkg express subject: '[6ow3idgirl] Submission via Contact Form: from hwakabh',
express-5c54656c8-bxxkg express textContent: 'This is a test email body for sending via Brevo backend.'
express-5c54656c8-bxxkg express }
express-5c54656c8-bxxkg express { messageId: '<202403201432.67322130421@smtp-relay.mailin.fr>' }
express-5c54656c8-bxxkg express POST /mail 201 762.862 ms - 63
Captures of UI after POST to endpoint by Nest controllers:
Evidences that the email has been arrived:
AsIs
When we submitted any data from contact form in production site, Nest have returned 500 Internal Server error, and we could not send actual emails to specific address.
As the log shows, in
MailService
we got 401 error when we invoked API of Brevo. This seems because we did not provide environment variableBREVO_API_KEY
to application on GKE, while Nest application would fetch it with@nestjs/config
(where we had already implemented in #72).ToDo
(Optional) Acceptance criteria
confirm that we can send email via contact form in production environment in GKE
(Optional) Additional contexts
Issue(s): #5