October 8, 2018 at 4:21 pm #445
Request to add functionality to swithmail: Attempt to send email even when there is a failure to access one (or more attachments), and log an error in the log file and conditionally to the bottom of the email body or as an error.log attachment.
October 11, 2018 at 9:07 am #449
interesting – I’ll look into this. Shouldn’t be too hard to implement.
May 21, 2019 at 2:10 pm #538
nitinkanParticipantThis reply has been marked as private.
June 19, 2019 at 11:13 am #545
I second this feature to ignore attachment doesnt exist
Not all of my messages have attachments and I don’t want the ones that don’t to fail to send
June 19, 2019 at 11:23 am #549
I haven’t had a chance yet – been a really busy month+ for me, but it’s still on my radar.
Thanks for the suggestion, and I’ll post back on here when I have an update pushed.
June 19, 2019 at 12:57 pm #565
I figured out a workaround and can get the email to send with or without an attachment.
if exist "%confirmdir%\confirms\!attachname!!atname!" echo !filename: =!.attachments!atname! & set attachexist=yes
if "!attachexist!" EQU "yes" set checkattach=^/a "%confirmdir%\confirms\extract\!attachfile: =!"
then in the swith command line I place the checkattach !variable!
between the subject and body text settings like:
/sub "email subject" !checkattach! /btxt "emailbodytext.txt"
so now if the attachment doesn’t exist the variable will be empty and no /a will be attached to the command
Also if you are running your script in a for loop be sure to clear the checkattach variable at the start of the loop like
- This reply was modified 3 months ago by onlinestatements.
June 19, 2019 at 1:10 pm #569
the echo filename is of course optional.
I just wanted to display the name of the attachment when sending the email if an attachment exists.
You must be logged in to reply to this topic.