diff --git a/backend/src/services/mail.service.js b/backend/src/services/mail.service.js index 6114ab2..530649b 100644 --- a/backend/src/services/mail.service.js +++ b/backend/src/services/mail.service.js @@ -85,7 +85,18 @@ class MailService { async testConnection() { try { await this.initializeTransporter(); - return { success: true, message: 'Gmail connection successful' }; + + // Send actual test email + const testEmail = await this.sendMail( + this.transporter.options.auth.user, // Send to self + 'Test Mail - Oltalama Paneli', + '

✅ Test Başarılı!

Gmail ayarlarınız doğru yapılandırılmış ve mail gönderimi çalışıyor.

Sistem: Oltalama Test Yönetim Paneli

' + ); + + return { + success: true, + message: `Test maili başarıyla gönderildi! (${testEmail.messageId})` + }; } catch (error) { return { success: false, error: error.message }; }