Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Email error with Multiple attachments/missing attachments

Featured Replies

This use to work regardless if all the EmailAttachFile exited or not. But now it doesn't and I don't now how to code in If thens in the code. This code works if all the EmailAttachFile have files in the containers or file locations.

 

EmailConnectSMTP(

        "mailfwd.xxx.gov"
     )
 and
    EmailCreate(  "xxxx xxx <[email protected]>" ; Employees self via Sup1 to full name::Email ; "Review for " &Employees::Full Name & " and " & Count(Files selected::File UID)+3 & " files" ) and
    EmailSetBody( $$emailbody ; "plain" ) and
 
    EmailAttachFile( Employees::global container ) and
    EmailAttachFile( Employees::global container 2) and
    EmailAttachFile( Employees::global container 3) and
    EmailAttachFile( Employees::global container 4) and
    EmailAttachFile( getvalue ( $$filessaved  ; 1 )) and
    EmailAttachFile( getvalue ( $$filessaved  ; 2 )) and
    EmailAttachFile( getvalue ( $$filessaved  ; 3 )) and
    EmailAttachFile( getvalue ( $$filessaved  ; 4 )) and
    EmailAttachFile( getvalue ( $$filessaved  ; 5 )) and
    EmailAttachFile( getvalue ( $$filessaved  ; 6 )) and
    EmailAttachFile( getvalue ( $$filessaved  ; 7 )) and
   
    EmailSend and
    EmailDisconnect

Looking at this script, I would expect that whenever one (or more) of those EmailAttachFile function calls fails, the email won't send. This is due to short-circuit evaluation of all these function strung together with the 'and' operator. If you're not familiar with short-circuit evaluation, it's a method of conditional evaluation without using more common control structures like if/then or loops.

 

Basically, when connecting expressions with 'and' operators, as you are, if any one of them fail, then the subsequent expressions won't be evaluated at all. In your case, if any of the AttachFile functions fail, the EmailSend function will never be called. If you separate those statements into their own Set Variable script step, you can avoid the short-circuit functionality, and this script should work.

  • Author

OK. Thanks. That is what I was trying but didn't know the syntax the plugin would accept. What is funny is that it use to work. 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.