Generated on Feb 19, 2025, 3:13:31 PMgemini-1.5-flash
; --- Configuration ---
email_recipient := "student_email@example.com" ; Replace with the student's email address
email_subject := "Welcome to [Institution Name]!" ; Replace with your institution's name
email_body := "Dear [Student Name],\n\nWelcome to [Institution Name]! We're thrilled to have you join our community.\n\nThis email confirms your upcoming welcome call scheduled for [Date] at [Time] [Time Zone]. During this call, we'll discuss [briefly list discussion topics, e.g., your academic program, student resources, and answer any questions you may have].\n\nYour advisor will be [Advisor Name] and you can reach them at [Advisor Email] or [Advisor Phone Number] if you have any questions before the call.\n\nWe look forward to speaking with you soon!\n\nSincerely,\nThe [Institution Name] Team"
; --- Function to send email ---
sendWelcomeEmail(recipient, subject, body) {
; Check if OutLook is running. If not, this will fail. Consider adding error handling.
if WinExist("ahk_exe OUTLOOK.EXE") {
; Use Outlook's COM object to send the email. Requires Outlook to be installed.
Run, outlook.exe
Sleep, 1000 ; Allow Outlook to fully load
oOutlook := ComObjActive("Outlook.Application")
oMail := oOutlook.CreateItem(0) ; 0 represents olMailItem
oMail.To = recipient
oMail.Subject = subject
oMail.Body = body
oMail.Display ; Shows the email in Outlook before sending. Remove .Display to send silently.
} else {
MsgBox, Outlook is not running. Please open Outlook before proceeding.
}
}
; --- Main script ---
; Get student information (replace with your method of retrieving this data)
student_name := "John Doe" ; Replace with the student's name
date := "October 26, 2024" ; Replace with the call date
time := "2:00 PM" ; Replace with the call time
timezone := "EST" ; Replace with the time zone
advisor_name := "Jane Smith" ; Replace with the advisor's name
advisor_email := "jane.smith@example.com" ; Replace with the advisor's email
advisor_phone := "555-123-4567" ; Replace with the advisor's phone number
institution_name := "Example University" ; Replace with your institution's name
; Replace placeholders in the email body
final_body := RegExReplace(email_body, "\[(.*?)\]", (A_CaptureGroup(1) = "Student Name") ? student_name : (A_CaptureGroup(1) = "Date") ? date : (A_CaptureGroup(1) = "Time") ? time : (A_CaptureGroup(1) = "Time Zone") ? timezone : (A_CaptureGroup(1) = "Advisor Name") ? advisor_name : (A_CaptureGroup(1) = "Advisor Email") ? advisor_email : (A_CaptureGroup(1) = "Advisor Phone Number") ? advisor_phone : (A_CaptureGroup(1) = "Institution Name") ? institution_name : "")
; Send the email
sendWelcomeEmail(email_recipient, email_subject, final_body)
MsgBox, Welcome email sent successfully!