You can try to use a Facade Design Pattern if you want to isolate your code from the other system functionalities to avoid problems in the future and you can a Adapter Desing Pattern if you want to improve your email sender and attempt to send messages or information by other means.