Email Configuration
Loading…
Email not configured. Add these lines to
/etc/systemd/system/hr-app.service under
[Service]:
✅ Option A — Shared Mailbox (best for noreply@thecommunitywellness.com):
In M365 Admin: create shared mailbox → grant your account "Send As" permission → enable Authenticated SMTP on it
Environment=SMTP_HOST=smtp.office365.com
Environment=SMTP_PORT=587
Environment=SMTP_USER=noreply@thecommunitywellness.com
Environment=SMTP_PASS=shared-mailbox-password
Environment=HR_FROM_EMAIL=noreply@thecommunitywellness.com
Environment=HR_FROM_NAME=NY Community Wellness Center — HR
Environment=HR_ADMIN_EMAIL=your-name@thecommunitywellness.com
Option B — Your regular M365 account (quickest setup):
M365 will use your account as sender but display the org name. Enable Authenticated SMTP on your account first.
Environment=SMTP_HOST=smtp.office365.com
Environment=SMTP_PORT=587
Environment=SMTP_USER=your-name@thecommunitywellness.com
Environment=SMTP_PASS=your-password-or-app-password
Environment=HR_FROM_EMAIL=noreply@thecommunitywellness.com
Environment=HR_FROM_NAME=NY Community Wellness Center — HR
Environment=HR_ADMIN_EMAIL=your-name@thecommunitywellness.com
Enable Authenticated SMTP: M365 Admin Center → Users → Active Users → select the account → Mail tab → Manage email apps → ✅ Authenticated SMTP → Save
Then:
systemctl daemon-reload && systemctl restart hr-app
Automated Reminders — All 11 Credentials
Every active employee with an email address is monitored. Reminders fire at 90 / 60 / 30 / 7 days before expiration, on the day itself, and daily for 7 days after. Each threshold fires only once per employee per credential — no duplicate emails.
| # |
Credential |
Reminders at |
| 1 | Professional License | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 2 | DEA Certificate | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 3 | FL Driver License | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 4 | AHCA Background Screening | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 5 | Professional Liability Insurance | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 6 | CEU (Continuing Education) | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 7 | CPR/BLS Certification | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 8 | Passport | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 9 | I-9 Employment Eligibility | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 10 | Worker's Comp Exemption | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| 11 | Yearly Performance Evaluation | 90 / 60 / 30 / 7 / 0 days + 7 days post-expiry |
| Email Type |
Recipients |
When |
| Credential reminders (all 11) | Employee + Admin | Automatic — daily 8:00 AM ET |
| Weekly HR digest | Admin only | Automatic — every Monday 7:00 AM ET |
| Welcome email | Employee + Admin CC | Manual — ✉ Emails → Welcome |
| Offer letter | Employee + Admin CC | Manual — ✉ Emails → Offer Letter |
| Termination letter | Employee + Admin CC | Manual — ✉ Emails → Termination Letter |
EHR Shared Login — Setup
Connect the HR Portal to your EHR so admin and office manager users can log in with the same credentials. Three steps:
Step 1 — Add to HR systemd service (/etc/systemd/system/hr-app.service)
Environment=EHR_INTERNAL_URL=http://localhost:3000
Environment=EHR_INTERNAL_KEY=pick-any-long-random-string
Environment=JWT_SECRET=paste-ehr-jwt-secret-here
Step 2 — Add to EHR systemd service (/etc/systemd/system/wellness.service)
Environment=EHR_INTERNAL_KEY=same-string-as-above
Step 3 — Patch EHR server.js with two internal routes
Open the file EHR_PATCH_INSTRUCTIONS.js included in the HR Portal zip. Copy the two routes inside and paste them into wellness-server/server.js just before the catch-all line at the bottom (app.get('/{*path}', ...)).
Step 4 — Restart both services
systemctl daemon-reload
systemctl restart wellness
systemctl restart hr-app
Then go to User Management → Sync from EHR to import users immediately.
VPS Configuration — Nginx (Option B: Path-based)
Add this inside your existing server { } block in your Nginx config, before the location / { } block:
location /hr {
return 301 /hr/;
}
location /hr/ {
proxy_pass http://localhost:3001/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_cache_bypass $http_upgrade;
proxy_read_timeout 60s;
}
After saving: nginx -t && systemctl reload nginx