Files
gt-ai-os-community/apps/control-panel-backend/app/core/email.py
HackWeasel 310491a557 GT AI OS Community v2.0.33 - Add NVIDIA NIM and Nemotron agents
- Updated python_coding_microproject.csv to use NVIDIA NIM Kimi K2
- Updated kali_linux_shell_simulator.csv to use NVIDIA NIM Kimi K2
  - Made more general-purpose (flexible targets, expanded tools)
- Added nemotron-mini-agent.csv for fast local inference via Ollama
- Added nemotron-agent.csv for advanced reasoning via Ollama
- Added wiki page: Projects for NVIDIA NIMs and Nemotron
2025-12-12 17:47:14 -05:00

30 lines
927 B
Python

"""
Email Service for GT 2.0
SMTP integration using Brevo (formerly Sendinblue) for transactional emails.
Supported email types:
- Budget alert emails (FR #257)
"""
import os
import smtplib
from email.mime.text import MIMEText
from typing import Optional, List
import structlog
logger = structlog.get_logger()
def get_smtp_config() -> dict:
"""Get SMTP configuration from environment"""
return {
'host': os.getenv('SMTP_HOST', 'smtp-relay.brevo.com'),
'port': int(os.getenv('SMTP_PORT', '587')),
'username': os.getenv('SMTP_USERNAME'), # Brevo SMTP username (usually your email)
'password': os.getenv('SMTP_PASSWORD'), # Brevo SMTP password (from SMTP settings)
'from_email': os.getenv('SMTP_FROM_EMAIL', 'noreply@gt2.com'),
'from_name': os.getenv('SMTP_FROM_NAME', 'GT 2.0 Platform'),
'use_tls': os.getenv('SMTP_USE_TLS', 'true').lower() == 'true'
}