Filemaker Script Sends Emails with Repeating Recipient Name

When this script is executed, it sends an email to several employees. In Outlook, only one email is received by each person (as it should be), but the TO: header contains many repetitions of the recipient's email address. I can't figure out why this happens. There is a loop in the script, but the email step is called OUTSIDE the loop. I have attached a screen print of the script, with certain details omitted for privacy.

We are sending via SMTP, on MS Exchange


emailScript.jpg
LVL 2
rvfowler2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

webwyzsystemsCommented:
If you have several records in a row, with JIM as the LeadData::SalesmanFullName, then your script will execute the code "Set Jims Email Body" several times in a row.
Are you setting something else in that code like the TO: field?

By looking at this script, I can conclude that the design has weaknesses in a few areas.
Much better to remove all those personal names, and deal with related records, lists, or variables instead.
When names are hardcoded into scripts, then scripts need to be reprogrammed when someone changes jobs, or a new person comes on board. This area needs to be improved.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lesouefCommented:
there is also a feature which not very obvious which allows to send the same email to the whole foundset at once or just to the current record. If you choose 1st option and loop through all records, that will send a lot...
0
rvfowler2Author Commented:
Thanks, will look into this.  Just to clarify, we don't get a bunch of emails, just that it is addressed numerous times.  The Exchange Server probably has an automatic function to only send once when addressed multiple times to the same person.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

lesouefCommented:
it seems it has this feature, I just tried on my office one.
so if you receive it several times, it is probably sent several times.
0
rvfowler2Author Commented:
Great tips, but they don't address our problem.  We execute the code, e.g., "Set Jims Email Body" more than once because we want to append to the body text field, but no we have not coded a TO section in the script Jims Email Body.

Also, the script is designed to only send the whole foundset once.
0
rvfowler2Author Commented:
We figured it out.  Though we did check the radio button "One email using data from the current record," we did not uncheck the check box "Collect addresses across found set."  Once we unchecked it, this fixed our problem of mulitiple addressees.  However, one last question.  Why is this one by default and why is it not dependent on the radio button above it?  Thank you.
0
rvfowler2Author Commented:
Actually, in rereading this, it seems that lesouef was probably refering to unchecking the checkbox after all.  Anyway, it worked.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.