Tag Archives: MimboloveSMTP

PowerShell Script: Mass-Mailer

Written by Tao Yang

Today a colleague asked me to write a script to send out a email to a large group of people but have the phrase “Dear <person’s name”>” in the beginning of email body.

I quickly wrote this script. Here are the steps you need to take before executing it:

1. Zip and place the Mass-Mailer folder somewhere on your computer. There are 3 files in the folder:

image

2. in Mass-Mailer.ps1 file, modify the highlighted section ( and remove the “<” and “>”brackets):

image

3. Open recipientsList.txt and enter recipients name and emails, one recipient per line with format Name;Email (i.e. John Smith;John.Smith@xxx.com)

image

4. Write the email in EmailBody.txt

image

5. Execute Mass-Mailer.PS1

The email is sent to each recipient individually. it looks like:

image

PowerShell Script: Test-SMTP

Written by Tao Yang

I wrote this simple script last week to test SMTP server by sending a testing email.

Usage: .\Test-SMTP.PS1 -smtp smtp.xxxx.com -port 25 -from test@xxxx.com -to recipient@xxxx.com

If the email is successfully, the recipient will receive an email similar to this:

image

The email contains the following information:

  1. Originating Computer: Where the script was run from
  2. SMTP Server Address: The SMTP server that sent this email
  3. SMTP Server Port: default SMTP port is 25
  4. Return (sender) address: This does not have to be a real address
  5. Recipient: Where the email is sent to.