email functionality in FileMaker

Hi

Hopefully get some help here.

I have a database of contacts in FileMaker 7.3 and I would like to introduce email functionality, so that I can email contacts.

More specifically:
1. Be able to send emails from FileMaker (receiving emails is not important)
2. Email that I've sent to contacts should be stored, so that I can see a history of the emails that I've sent to my contacts.
3. Create email templates that can be used when sending emails.

I'm not a FileMaker expert, and have minimal knowledge of scripts.

I would really appreciate a fool-proof step by step guide on how to achieve this functionality.

ost87Asked:
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.

lesouefCommented:
First I wanna make sure you agree on what FM can do.
Do you wish to send plain text or HTML? FM can only send text emails and attached files.
Do you want to rely on the current session default email application or do you want fm to independant of any app to send the email? FM only uses the default account of the default email app to send the email.
And yes, FM can store the stuff sent since the email can be fully made up from fields contents, but does not know of the email app has effectively sent the email if anything goes wrong with the email app or used a wrong address, etc...
I personnally uses either:
- internal email FM generation for simple emails + attached PDF previously done with FM for complex stuff
- or use an external plug-in to send HTML emails independently from anything else (has a cost per client used)

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:
(same without the mistakes!)
First I wanna make sure you agree on what FM can do.
Do you wish to send plain text or HTML? FM can only send text emails and attached files.
Do you want to rely on the current session default email application or do you want fm to be independant of any app to send the email? FM only uses the default account of the default email app to send the email.
And yes, FM can store the stuff sent since the email can be fully made up from fields contents, but does not know if the email app has effectively sent the email if anything goes wrong with the email app or used a wrong address, etc...
I personnally uses either:
- internal email FM generation for simple emails + attached PDF previously done with FM for complex stuff
- or use an external plug-in to send HTML emails independently from anything else (has a cost per client used)
billmercerCommented:
The best way to do this depends somewhat on the nature of your messages. What kind of emails do you want to send? Will they be mostly boilerplate with a few fields here and there? Or will they be something more complex?

 If you just want to personalize a form letter with a few short fields, you may want to use a simple string concatenation, which can be a single calculated field, like this:
  MsgBody = "Hello " & FirstName & ", how are you today? Please try our delicious " & name-of-product " snack food. Thanks!"

If you need something more complicated, you will probably want to build the message body through a series of script steps, possibly including a looping structure. Here is some pseudocode illustrating the concept :

Set Field  MsgBody; "Hello " & FirstName & ",¶" ]
Set Field  MsgBody; MsgBody & "Here is a list of items for you to look at.¶"
Find Some Records
Go To First Record
Loop
  Set Field MsgBody; MsgBody & Itemnumber & "      " & name-of-product & "¶"
  Go To Record Next, Exit After Last
End Loop
Set Field MsgBody; MsgBody & "Thanks for looking at this list¶"

This way you can build a fairly complicated text message based on a set of records.



You'll need to create a new table to hold the email messages, with fields to identify the contact, the body of the email, and any other information you might want to record.

You'll probably also want another new table to hold the boilerplate text for multiple email templates.
You may want a script that generates the message text.

<soapbox>If your goal is to make sure that your email gets through to and is actually read by the recipient, then you should ONLY send plain text emails. Reasons to avoid HTML email include:
1) Some recipients simply cannot view it.
2) It's more likely to be broken or screwed up during processing.
3) It's wasteful. It takes up lots more space and bandwidth.
4) It is commonly used by spammers, so it makes your message look like spam, and is more likely to be blocked or filtered.
5) HTML email is a vector for security risks, including viruses, trojans, web bugs, and other things, so it is more likely to be blocked by security software.
6) it's problematic for people using non-standard computer equipment, such as cell phones and pdas, or screen readers for the blind.
</soapbox>
lesouefCommented:
If you find the above concatenation a bit hairy to type, you may be interested by my way:
I use a text field as a template, and put every variable in between brackets (which normally does not exist in a normal text).
Then when required, I use a nested substitute function to replace every variable by its value, then send it.
quick one:
template field:
"I wanted to thank [polite_form], for your visite on [date]."

substitute (email_body ; "[polite_form]" ; polite_field )
substitute (email_body ; "[date]" ; date_field )

once nested:

substitute (subtsitute (email_body ;
"[date]" ; date_field ) ;
"[polite_form]" ; polite_field
 )

I found this method a lot easier to read when you have 50 lines of text with 25 variables interleaved
so up to you now!
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
FileMaker Pro

From novice to tech pro — start learning today.