Subject amd body needed sending email from command line
Scan documents to PDF and other file types, as simply as possible.
Brought to you by:
ben-cyanfish
Hello,
In reference to this bug about emailing a pdf from command line, the issue has been solved, but now I found another (not so important) bug related to the ability of adding placeholders to the subject and to the body of the email. Now, in order to send an email you MUST include a subject and a body for it. I was sending emails with a subject but without a body and thus I got an error.
I think it's because of these new lines in AutomatedScanning.EmailScannedImages():
Subject = fileNamePlaceholders.SubstitutePlaceholders(options.EmailSubject, startTime, false) ?? "",
BodyText = fileNamePlaceholders.SubstitutePlaceholders(options.EmailBody, startTime, false
The SubstitutePlaceholders function is getting no string if you don't set them in your command. It's easy to bypass by adding
--subject "" --body ""
to the command line in case you don't need them, though.
Thanks!
It works perfect! Thanks!