@@ -160,10 +160,10 @@ func sendOrderConfirmation(ctx context.Context, orderID string) error {
160160
161161 // SMTP configuration
162162 smtpConfig := SMTP {
163- Email : "orders @company.com",
164- Password : os .Getenv ("SMTP_PASSWORD" ),
165- Host : " smtp.gmail.com",
166- Port : "587" ,
163+ Email : os . Getenv ( "SMTP_EMAIL" ), // e.g., "noreply @company.com"
164+ Password : os .Getenv ("SMTP_PASSWORD" ), // e.g., "your-app-password"
165+ Host : os . Getenv ( "SMTP_HOST" ), // e.g., " smtp.gmail.com"
166+ Port : os . Getenv ( "SMTP_PORT" ), // e.g., "587"
167167 }
168168
169169 // Create email payload
@@ -265,10 +265,10 @@ func sendNewsletter(ctx context.Context) error {
265265
266266 // SMTP configuration
267267 smtpConfig := SMTP {
268- Email : "newsletter @company.com",
269- Password : os .Getenv ("SMTP_PASSWORD" ),
270- Host : " smtp.gmail.com",
271- Port : "587" ,
268+ Email : os . Getenv ( "SMTP_EMAIL" ), // e.g., "noreply @company.com"
269+ Password : os .Getenv ("SMTP_PASSWORD" ), // e.g., "your-app-password"
270+ Host : os . Getenv ( "SMTP_HOST" ), // e.g., " smtp.gmail.com"
271+ Port : os . Getenv ( "SMTP_PORT" ), // e.g., "587"
272272 }
273273
274274 // Create email payload
@@ -377,10 +377,10 @@ func sendPasswordReset(ctx context.Context, userEmail, resetToken string) error
377377 }
378378
379379 smtpConfig := SMTP {
380- Email : "security @company.com",
381- Password : os .Getenv ("SMTP_PASSWORD" ),
382- Host : " smtp.gmail.com",
383- Port : "587" ,
380+ Email : os . Getenv ( "SMTP_EMAIL" ), // e.g., "noreply @company.com"
381+ Password : os .Getenv ("SMTP_PASSWORD" ), // e.g., "your-app-password"
382+ Host : os . Getenv ( "SMTP_HOST" ), // e.g., " smtp.gmail.com"
383+ Port : os . Getenv ( "SMTP_PORT" ), // e.g., "587"
384384 }
385385
386386 emailPayload := NewSendEmail (
0 commit comments