Current setup:
Code: Select all
[Email]
CongregationalEmailGreeting="Thank you %RecipientFirstName% for requesting today's sermon. We hope it brings you and your loved ones closer to the Will of God.||This sermon's title is "%CellSermon_Title%", and it was preached by %CellPreacher1%.||May the Lord Bless and Keep you this glorious day.||Sincerely,|The Media Ministry on behalf of our Pastor|Our Church in Our Town, USA|||Opening Verses %CellPreacher1% used in this sermon:|%CellOpen_Verse%
Code: Select all
the_Body =
(
Thank you %RecipientFirstName% for airing today's sermon. We hope it brings your listeners closer to the Will of God.
Sincerely,
Our Church
)
; Create the actual email using the above variables
oMail := ComObjCreate("Outlook.Application")
NewMail := oMail.CreateItem(0)
NameSpace := oMail.GetNamespace("MAPI")
NewMail.SendUsingAccount := NameSpace.Accounts.Item("[email protected]")
NewMail.Subject := subject
FormatHTML := 2
NewMail.BodyFormat := FormatHTML
NewMail.Body := the_Body
NewMail.Attachments.Add(Attachment)
NewMail.To := EmailAddr[A_Index]
NewMail.Display
NewMail.Send
Code: Select all
IniRead, CEmailGreeting, %OneDriveFolder%\AutoReaper.ini,Email,CongregationalEmailGreeting
Transform, CEmailGreeting, Deref, % CEmailGreeting
StringReplace, CEmailGreeting, CEmailGreeting, `%0D`%0A,|,All
the_Body = %CEmailGreeting%
What am I doing wrong here?