Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Where to place EmailAttachFile within a loop so the appropriate file is attached?


This topic is 2396 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I currently am setting up a bulk-send script that needs to include an attachment. The attachment is a pdf in a folder that is saved ahead of time (from outside FM). 

I am not sure where in the script to put the actual attachment function. 

  • Outside the loop: The same file is sent in every email. (The pdf that relates to the first record)
  • Inside the loop: The first email is right, the 2nd has the first pdf, plus the correct one, the third has the first two plus the correct one, and so on.

What am I missing?

Thanks.

 

EmailRegister [..]
EmailConnectSMTP [..]
EmailConnectIMAP [..]

EmailCreate [..]

Go to Record [First]

Loop
     EmailAttachfile [..]
     
     EmailRecipients [..]
     
     EmailSetSubject [..]
     EmailSetBodyFile [..]
     
     ...
     
     EmailSend
     EmailMoveCurrentMessage [..]
     
     Go to Record  [Next]
     
End Loop

EmailDisconnect
     

 

Fixed.

I moved EmailCreate inside the loop.

 

That was easy. 

Edited by MileFaker3000

This topic is 2396 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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