Yes, electronic W-9s are legal as long as IRS guidelines are followed. Here is what the IRS says about the electronic submission of Forms W-9 in their Instructions for the Requester of Form W-9.
Electronic Submission of Forms W-9 Requesters may establish a system for payees and payees’ agents to submit Forms W-9 electronically, including by fax. A requester is anyone required to file an information return. A payee is anyone required to provide a taxpayer identification number (TIN) to the requester.
Generally, the electronic system must:
Ensure the information received is the information sent, and document all occasions of user access that result in the submission;
Make reasonably certain that the person accessing the system and submitting the form is the person identified on Form W-9, the investment advisor, or the introducing broker;
Provide the same information as the paper Form W-9;
Be able to supply a hard copy of the electronic Form W-9 if the Internal Revenue Service requests it; and
Require as the final entry in the submission an electronic signature by the payee whose name is on Form W-9 that authenticates and verifies the submission. The electronic signature must be under penalties of perjury and the perjury statement must contain the language of the paper Form W-9.
For Forms W-9 that are not required to be signed, the electronic system need not provide for an electronic signature or a perjury statement.
For more details, see the following.
Announcement 98-27, which is on page 30 of Internal Revenue Bulletin 1998-15 at www.irs.gov/pub/irs-irbs/ irb98-15.pdf.
Announcement 2001-91, which is on page 221 of Internal Revenue Bulletin 2001-36 at www.irs.gov/pub/irs-irbs/ irb01-36.pdf.