While you are working on database email failure issues, you need to be sure whether the issue is with the DB mail configuration within SQL or with the SMTP server. To find out this, you can send a test email using the Powershell script.
1 2 3 4 5 6 7 8 9 10 11 |
$EmailFrom = “demo@outlook.com” $EmailTo = “demo1@gmail.com” $Cc = "demo2@gmail.com" $Attachment = "C:\Temp\xximagexx.jpg" $Subject = “Test From PowerShell” $Body = “Did this work?” $SMTPServer = “smtp.outlook.com” $SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587) $SMTPClient.EnableSsl = $true $SMTPClient.Credentials = New-Object System.Net.NetworkCredential(““demo@outlook.com”, “password””); $SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body) |
Service | SMTP server | Port | Connection |
Gmail | smtp.gmail.com | 587 25 465 |
TLS TLS SSL |
Office 365 | smtp.office365.com | 587 25 |
TLS |
Outlook.com | smtp-mail.outlook.com | 587 25 |
TLS |
Yahoo mail | smtp.mail.yahoo.com | 587 25 465 |
TLS TLS SSL |
Windows Live Hotmail | smtp.live.com | 587 25 |
TLS |
Zoho | smtp.zoho.com | 587 465 |
TLS SSL |
Send an Email Using Windows PowerShell While you are working on database email failure issues, you need to be sure…
#COMPANY- Oracle (OFSS), Location -Bangalore 1. Describe oracle architecture. 2. What is the role of PMON process? 3. What are…