Hmm... sounds like fun actually!
I take you have the right setup to do this? Server with PHP and MySQL?
You'd need to first of all create a form in normal HTML where the user can enter a message, their name, the name of the person they want to send this to and their email address.
Send that info over to a php page, save all of this in a database and give it a number. Then send the number to the email the user typed in...
... and then another form where the receiving person types in the number they received, that form submits to another script that will call up the greeting saved in the database...
Might be a good idea to add a password to the ecard number to make sure people cant access other users cards.