What the extractor counts as an email address
An email address has two halves joined by an @: the mailbox name and the domain. The extractor looks for the shape people actually use, which is letters, digits, dots, underscores, percent signs, plus signs and hyphens before the @, then a domain with at least one dot and an ending of two or more letters. Anything wrapped around the address, such as brackets, a mailto: prefix or the full stop at the end of a sentence, is left behind.
| In your text | Extracted | Why |
|---|---|---|
| Email me (pat.lee@school.edu) today | pat.lee@school.edu | Brackets and spaces aren't part of an address |
| mailto:help@site.org?subject=Hi | help@site.org | The link prefix and subject line are dropped |
| jo.smith+news@mail.example.co.uk | jo.smith+news@mail.example.co.uk | Plus tags and long domains are kept whole |
| Write to first.last@example.ca. | first.last@example.ca | The sentence's full stop is trimmed |
| user@localhost | Nothing | No dot in the domain |
| info@münchen.de | Nothing | Accented letters in the domain aren't matched |
| o'brien@example.com | o'brien@example.com | Apostrophes in the name are kept |
The email standard, RFC 5322, allows far stranger addresses than these, including quoted names with spaces inside them. They almost never turn up in real lists, so matching the common shape gives cleaner results. The cost is the occasional rare address that's missed, like the two rows above the last one, so skim the list for names you expected to see.
Duplicates, capital letters and the order of the list
Duplicates are matched without regard to capital letters, so Pat.Lee@School.edu and pat.lee@school.edu count as one address, and whichever spelling comes first in your text is the one you keep. Domains never care about case, and in everyday use the part before the @ is treated the same way, so this is almost always what you want.
Example: A sign-up sheet typed up from three clipboards
- Pasted text: names, phone numbers and emails from a school fair
- Addresses found with duplicates kept: 188
- With duplicates removed: 161
27 entries were repeats, usually families who signed up at more than one table. Send one message per address, not one per signature.
Sorting A to Z orders the list by the part before the @, so it groups first names rather than companies or schools. Leave the list in its original order when the order means something, such as who signed up first.
Anti-spam rules to check before you hit send
Finding an address isn't the same as having permission to market to it. Canada's anti-spam law (CASL) generally requires consent before you send a commercial electronic message, and Canadian privacy law (PIPEDA) prohibits address harvesting, meaning collecting addresses with a computer program, with very limited exceptions. The US CAN-SPAM Act works on an opt-out basis instead, but the FTC's guide lists harvesting addresses, or generating them through a dictionary attack, among the practices that can bring criminal penalties.
- Use extracted addresses for people who already expect to hear from you: your own club roster, a class list or customers who signed up.
- Keep a record of how and when each person agreed. Under CASL, it's the sender who has to prove consent.
- Give every marketing email a working unsubscribe link. Both laws require a way to opt out, and CAN-SPAM makes no exception for business-to-business email.
- For a one-off personal message to a group, put the addresses in Bcc so nobody's address is shown to everyone else.
Getting addresses out of emails, web pages and PDFs
| Source | What to paste | Watch for |
|---|---|---|
| Email thread | The header lines and signatures | Many mail apps show only display names, so open the full To and Cc details first |
| Web page | The copied page, or its source code | Source code can include image names like logo@2x.png, which look like addresses |
| Select all and copy | An address split across two lines comes out cut short or not at all | |
| Spreadsheet or contacts export | The whole column or file | Several address columns per person, such as home and work |
After extracting, Compare Two Lists shows which addresses are new compared with the list you already have, and Remove Duplicate Lines cleans up a list you've merged by hand.
Skim the finished list for typos before you import it anywhere. Handwritten sign-up sheets produce gems like gmial.com, hotmal.com or an address ending in .con, and every one of them will bounce. Fix the obvious ones and ask in person about the rest.
Delete role addresses such as info@, sales@ and noreply@ before a personal mailing. They reach a shared inbox or nobody at all, and a noreply address usually isn't monitored.
Sources and further reading
- Government of Canada: Canada's anti-spam legislation (CASL)ised-isde.canada.ca
- Office of the Privacy Commissioner of Canada: Guidance for businesses doing e-marketing (address harvesting)priv.gc.ca
- FTC: CAN-SPAM Act compliance guide for businessftc.gov
- RFC 5322: Internet Message Format (address syntax)rfc-editor.org