Format for the Email File
Creating the file that will become the email sent to each user in the Data File
On the right is a simple version of a file that will produce an email, sent to a user specified in the data file.
Subject
When you send an email, you write a subject, or title, for the email, and then the body. Same thing with KeepMyMembers. In the email file, you need to specify the title at the top of the message.
!beginSubject!This is the Subject!endSubject!
When the software opens the file, it looks for certain keywords. A keyword tells a program, treat what's coming up as something special. !beginsubject! specifies the beginning of the subject. The text that follows the second exclamation mark will be treated as the subject. In the example here, 'This is the Subject', will appear as the subject of the email when the user sees the incoming email. Obviously, !endsubject! terminates the subject.
Body of the email
!begintext!
!begintext!This signifies to the user that the text part of the message is about to start. This is where you will put the body of the message to be sent to your users. The end of the text message will be signified by !endtext!.
Sending a fancier email
When you send an email, your email editor most likely sends two emails, in one message. The first email is a simple text version of your message. The second will have embedded html, that can make your message fancier, maybe providing a link that a user can click to perform some specific behavior.
Who decides which is seen?
When you receive an email, your email program checks to see if you are willing to receive the html version of an email. If you have selected to only receive a text version, you'll see only the text. If the email exists only as text, you'll see the simple text version. If your email software has the ability to view html, you've selected (normally yes by default) to view html, and an html version exists, then you will view the incoming email as html. If you are seeing different colors, an embedded logo, or buttons to click, most likely you are viewing the HTML version.
!beginhtml!
The !beginhtml! keyword allows us to send an email that has some embedded html. This will improve the appearance of your emails, and allow you to provide a specific action for the user to take. The text of message will most likely appear very much the same as the text of the message in the text only version that you wrote above.
Inserting Merged Data
In the data file you will merge with this file, there is a header line at the very top. This header line defines what is in each field in each line that follows. In our example, one of the fields is 'first_name'. In each record that follows, the users first name is found in this field. You may want to use this information within the body of your email. To insert a data field in your email, we use a double chevron, followed by the field name, and then two closing chevrons. To insert the users first name in your email, you will write <> in both the text email, and the html version of your email.
One thing to keep in mind is that the spelling of the field name must match exactly with the spelling that is found in the header file of your data file. One character off, and the field won't be found.