Posts

Showing posts from April, 2019

Powershell script to automatically send HTML emails using gmail smtp

Image
Hi please find the script/code below which can be used (as a example  use case) for sending automated reminders for filling time-sheets  to all employees on every Friday(can be any day depending on when you schedule it to run using windows task scheduler as per your requirements) using gmail gsuite or any other email providers: Things Required: SMTP outgoing port(587) allowed through firewalls No-reply email which will be used for sending emails Application password (as gmail blocks sending emails from scripts if direct credentials(username & normal password) are used and sends warning alerts and notifications to owner and eventually blocks the account if not rectified thus application password needs to be created and used to prevent that from happening,steps for creating same are given below) Server which runs 24x7 where we will place and schedule our scripts to run at specific time.(You can use your local PC systems and execute script manually by double clicking if requir