Skip to content

Commit

Permalink
Switch from gmail w/ nodemailer to personal email domain w/ nodemailer
Browse files Browse the repository at this point in the history
  • Loading branch information
a26blass committed May 1, 2024
1 parent ac6a153 commit 31b5035
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
location: ${{ env.GCP_REGION }}
- name: Create Gmail App Password Kubernetes Secret
run: |
kubectl create secret generic gmail-secret --from-literal=GMAIL_PASSWORD="${{ secrets.GOOGLE_APP_PASSWORD }}" --dry-run=client -o yaml | kubectl apply -f -
kubectl create secret generic email-secret --from-literal=EMAIL_PASSWORD="${{ secrets.PERSONAL_EMAIL_PASSWORD }}" --dry-run=client -o yaml | kubectl apply -f -
- name: Deploy the new site to the cluster with helm
if: |
needs.check-changed-files.outputs.site-changed == 'true' ||
Expand Down
9 changes: 4 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ var usersRouter = require('./routes/users');
const nodemailer = require("nodemailer");

const transporter = nodemailer.createTransport({
service: "Gmail",
host: "smtp.gmail.com",
host: "mail.privateemail.com",
port: 465,
secure: true,
auth: {
user: "alexblass[email protected]",
pass: "process.env.GMAIL_PASSWORD",
user: "alexblass@alexblass.me",
pass: "process.env.EMAIL_PASSWORD",
},
});

Expand Down Expand Up @@ -52,7 +51,7 @@ app.post('/submit', function(req, res) {
console.log('New Message:: ' + name + ' :: ' + email + ' :: ' + message)

const mailOptions = {
from: "alexblass[email protected]",
from: "alexblass@alexblass.me",
to: "[email protected]",
subject: "New Message From " + email,
text: "Name: " + name + "\n" + message
Expand Down
6 changes: 3 additions & 3 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ spec:
ports:
- containerPort: 8080
env:
- name: GMAIL_PASSWORD
- name: EMAIL_PASSWORD
valueFrom:
secretKeyRef:
name: gmail-secret
key: GMAIL_PASSWORD
name: email-secret
key: EMAIL_PASSWORD


0 comments on commit 31b5035

Please sign in to comment.