Re: Email Button



In article
<c7520aa3-5982-4099-8f47-d716e51d883a@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
JayBee <Jennifer_Beecroft@xxxxxxxxxxx> wrote:

Hi All

I already have an email button that opens up the email software and
creates a message with the specified email address already input; the
email address specific to that customer record.

However we would now like a seperate button for a similar task but
aswell as imputting the email address specific to that customer record
it would need to create a template email with specified wording. Is
there a way to implement this; to specify the contents of the body of
the email. If it is possible it would also be great to draw fields
from a seperate table specific to that customer record and include
those in the body of the email.

I'm not sure how to implement it.

Any ideas? Greatly appreciated ;-)

You don't say what version of FileMaker and there may be a better way
in newer version, but one way is to use a Global field to store the
main text of the template email. This Global field will need to use
placeholders for record-specific data in a similar way to Merge Field.
eg.
g_TemplateEmail Global, Text

into which you type / paste your email text with placeholders:

Dear <<FirstName>>,

Our records show that your membership <<Member Num>>
expired on <<Expiry Date>>.

Regards

Club Secretary

Then you can create a Calculation field that takes this Global email
text and replaces the placeholders with the appropriate record-specific
data using the Substitute function.
eg.
EmailLetter Calculation, Text Result, Unstored
= Substitute(
Substitute(
Substitute(
g_TemplateEmail; "<<Member Num>>"; Member Num
);
"<<FirstName>>"; FirstName
);
"<<Expiry Date>>"; Expiry Date
)

In newer versions of FileMaker you apparently do not need to nest
multiple Substitute functions, but can instead use one Substitute
function with multiple replacements.

This field can then be used by the Send Mail command for the message
text.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
.