Situation: I’m an employee at a large University, and have been assigned the task of trying to send financial aid award letters to students, in bulk, based on each student’s specific aid qualifications.
Goal: automation of award emails to students.
Proposed Solution: Use of Powershell to send emails to students in an automated fashion. The passing and use of variable values to determine which paragraphs they need to receive in their aid letters.
Emails need to go to the students in HTML format. Emails should be personalized to the students, with their first name at the top.
Dear Michael, Dear Linda, Etc.
Emails need to be ‘spruced up’ with HTML formatting and look professional and of Vprofessional correspondence quality.
Inclusion of the University logo information at the bottom of the email in some fashion is preferred.
This powershell code appeared to have worked and sends a basic email :
Send-MailMessage -Port 25 -To “Test Student " -From “Financial Aid " -SMTPServer smtp.college.edu -Subject “Testing” -Body “Test Message"
This powershell code also appears to be working:
[string] $data = Get-Content “C:\Users\USER68\Desktop\TargetFile2.txt”
Send-MailMessage -Port 25 -To “Testing Gmail " -From “Testing Technician " -SMTPServer smtp.college.edu -Subject “Testing” -BodyAsHtml $data
Sends over correctly the contents of a datafile.
From there I’m stumped. The next step would be to have another text file, that I read somehow with a powershell command, extract name information of the individual, pass it into an a variable, and personalize the email.
Later on, I would like to read in Boolean logic type values or other types of identifiers (also included in the student list text file) to determine which paragraphs of text to merge into the email that would then be generated to the student.
Help is greatly appreciated. I haven’t done any serious programming in years. Have I done it? Yes… I’ve done programming, C++ and so forth, but it will take a while and some help to get back into the zone, and I’m a complete newbie to powershell, although I do have a background in DOS and general concepts I see carrying over into powershell