Email Integration 

Sending Emails with Attachments Using SendGrid in Python

A step-by-step implementation of sending an email with attachments using SendGrid in Python. Step 1: Import the necessary modulesWe begin by importing the required modules for our implementation: Step 2: Define the send_email functionNext, we define the send_email function, which takes parameters for the sender’s email, recipient’s email, subject, plain text content, HTML content, and attachments (optional): Step 3: Handle attachments (if provided)If attachments are provided, we iterate over each attachment file and create a SendGrid Attachment object for it. We read the file contents, set the file name, type,…

Read More
MS SQL Server Windows Server 

Powershell script to check SQL service status and send email

In windows server we can create a PowerShell script to trigger an email on the basis of SQL service status. Solution Below The solution for checking the status of SQL Server service can be achieved by using the “Get-Service” cmdlet. In the below example we are using some common naming conventions of SQL server like MSSQL$, MSSQLSERVER, and SQL Server, etc. below code is to get the server status. Note: please check your SQL server name and replace them “MSSQLSERVER” in below code To send email we will use some…

Read More