Jump to content

Inserting a field into an EMail message body


FM7Newbie

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

Recommended Posts

Hey guys, I know this has been asked before but Ive gone through all pertinent posts and Im still having no luck getting this to work.

Here's the deal, very simple I know... I am using the SendMail function in a script, everything works great but for the body of the email, I want it to say something along these lines:

Hi <<Contacts::FirstName>>,

Thanks for joining our mailing list!

Sincerely,

Blah blah

The only problem is I cant figure out how to do this w/ calculation fields even though everyone says that is the thing to do. Could someone please just be super kind (and patient B)) enough to list out the steps to make this happen? I just need it to pull the contact's name from the current record's "FirstName" field and plug it into some generic paragraph I'll be using for everybody. Thank you sooo much!! If there's an easier way than calculated fields by all means share.

Link to comment
Share on other sites

UPDATE: Ok, so I found out it was just a problem in syntax... So I was wondering, are there any special characters that tell FileMaker to skip down a line so that the letter is formatted properly? Right now its just clumping everything together... thanks for putting up w/ newbie B)

Link to comment
Share on other sites

Thanks Mark, that carriage return did the trick... Your post was crystal clear and now I'm getting deeper w/ mass mailings sending out a similar letter to request volunteers based on their skillset that is inputed in the database... Basically I'll do a find for electrician experts, say 10 records come up as qualified contacts, then i want to click a button, run a script, and all 10 get a generic email w/ their name plugged in asking for volunteer help...

I noticed I can check off the box "Send to all records in found set" underneath the CC: in the SendMail script setup... well this works great, but the body has only the first record's name listed. Therefore everybody's getting an email that says "Hi Mark" which is no good... Any ideas on keeping the letter customized to each person it is sent to? Sorry to pick your brain so much... Thanks again all of this help is greatly appreciated!

If for some reason this cant be done w/ a simple calculation field can you point me in the right direction?

Matt

Link to comment
Share on other sites

Ok, so once again I came out of my thoughtless stupor and found a way to work it using the loop function... For anyone out there that cares this is the rough pseudocode of the script I made for mailing to multiple people without showing all people receiving the email in the To: field. Granted this is slower and not brilliant, but it works nonetheless...

Go to Record(first)

loop

sendmail (did NOT check "send to all browsable records" under the To: field)

go to next (Until last one is displayed)

end loop

exit script

Take care guys, thanx again for putting up w/ the learning curve here. I promise to get smarter B) or atleast quieter, :

Link to comment
Share on other sites

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