Jump to content

Sending separate emails to all records in table?


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

Recommended Posts

Hello all,

I'm using the script below to send emails with a PDF attachment contained in the record. However, I'd like the script to do this for each record in the table as currently it will only create one email for the record that is being viewed (I tried selecting the "multiple emails" field in the Send Mail setup but it didn't work). I figure this is probably an easy one, but I don't much about scripting yet. 

Anyone know how I can add a loop to do this for all records? 

Thanks!

image.png.fa6caee78b400eec9bbdbd7d761fad50.png

Edited by Dirigo
Link to comment
Share on other sites

Start by finding the records you want to take part in this. Then go to the first record and loop:

Show All Records
Go to Record/Request/Page [ First ]
Loop
  # YOUR CURRENT SCRIPT STEPS HERE
  Go to Record/Request/Page [ Next; Exit after last ]
End Loop

 

Link to comment
Share on other sites

20 hours ago, comment said:

Start by finding the records you want to take part in this. Then go to the first record and loop:


Show All Records
Go to Record/Request/Page [ First ]
Loop
  # YOUR CURRENT SCRIPT STEPS HERE
  Go to Record/Request/Page [ Next; Exit after last ]
End Loop

 

Thanks! This seems to do what I need, but with some quirks.

For some reason, if I'm using the "email client" option (which, of course is slow), it creates two emails for record. If I use SMTP, it creates 75 (!) emails for each record (75 is the number of records in the table). 

Any insight on how to get this down to one email per record using SMTP? 

Thanks again for the loop tip.

 

Link to comment
Share on other sites

2 minutes ago, comment said:

Without seeing your script, I can only guess. Are you sure you have the option One email using data from the current record selected?

Doh! That was my mistake, had it set to "multiple". Works like a charm now - thanks again! 

Link to comment
Share on other sites

This topic is 1719 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.