Adding an Email Link

Whenever you want to invite your visitors to email you, an email link is the perfect solution. When someone clicks an email link, her email program launches automatically, and a new message opens with your email address already in the To field. She can then just type her message and send it off.

An email link looks like this: mailto: bob@cosmofarmer.com. The first part, mailto:, indicates the type of link, while the second part (bob@cosmofarmer.com) specifies the email address.

Note

Email links work only if the person who clicks the link has an email account and an email program. If someone visits your site from a computer at the public library, for example, he might not be able to send email. If this drawback troubles you, remember that you can also collect information using a form (as discussed in Chapter 10), a feedback method that has neither the limitations nor the easy setup of an email link.

You can create an email link much the way you’d create any other Dreamweaver link: by selecting some text or an image and typing the mailto address, as shown above, into the Link field in the Property inspector. To simplify this process, Dreamweaver has a quick method of inserting an email link:

  1. On the Common tab of the Insert bar, click the Email Link icon, which looks like an envelope (see Figure 4-6).

    Alternatively, choose InsertEmail link. In either case, if you’ve already typed the text (Email me!) on your Web page, select it first. The Email Link dialog box opens (see Figure 4-7).

    The Email Link dialog box lets you specify the text that appears on the Web page and the email address for a mailto link. You can also select some text you’ve already added to the document and click the Email Link icon on the Insert bar. The text you selected is copied into the Text field in this dialog box.

    Figure 4-7. The Email Link dialog box lets you specify the text that appears on the Web page and the email address for a mailto link. You can also select some text you’ve already added to the document and click the Email Link icon on the Insert bar. The text you selected is copied into the Text field in this dialog box.

  2. In the Text field, type the text that you’ll want to appear on the Web page.

    This should give visitors some indication of what the link does. For instance, Email the Webmaster. (If you selected text in the document first, it automatically appears in the Text field.)

  3. Type an email address into the E-Mail field.

    This is the address that appears in the user’s email program when she clicks the link. (You don’t have to type mailto:—Dreamweaver adds it to the email address automatically.)

  4. Click OK.

Dreamweaver adds the text to the page, complete with a mailto link.

Get Dreamweaver MX: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.