That is only a snippet of code. Every sketch requires a function called 'setup' and a function called 'loop' and your code does not have either of those.
In the IDE, if you go to File -> New you will see the bare bones template of what a sketch needs to be. You can cut and paste your Email class into that.
It sounds like you got this code from somewhere and don't know what do to do with it. If that is the case, you will need to learn some C/C++ programming if you want to use Arduino. Start small.
Normally, things like your code would go into an "Email.h" header file and would be accompanied by the Email.cpp file that implements all those functions in the class. Pretty advanced concepts for someone new..
Your "code" is an include file. As the others have noted, you need a sketch (a .ino) file with at least the setup() function and, within that .ino, #include "email.h" or whatever it's called.