İçeriğe geç
Rhino Türkiye

Wiki

Email Notification - SMTP ile Durum Raporu

Script email notification - Kurulum sonucu SMTP ile gönderme.

Email notification, kurulum sonucunu IT ekibine otomatik bildirir. Başarı/başarısızlık durumunu raporlar.

PowerShell Send-MailMessage

  • $smtpServer = 'smtp.firma.com'
  • $from = 'deployment@firma.com'
  • $to = 'it-team@firma.com'
  • $subject = 'Rhino Deployment - Success'
  • $body = 'Rhino başarıyla kuruldu: $env:COMPUTERNAME'
  • Send-MailMessage -SmtpServer $smtpServer -From $from -To $to -Subject $subject -Body $body

Conditional Notification

  • if ($exitCode -eq 0) {
  • $subject = 'Success'
  • $body = 'Kurulum başarılı'
  • } else {
  • $subject = 'FAILURE'
  • $body = "Exit code: $exitCode"
  • }
  • Send-MailMessage...

Advanced Reporting

  • Attach log file: -Attachments $logFile
  • HTML body: -BodyAsHtml
  • CC: IT manager
  • Priority: -Priority High (hata durumunda)