Google is your friend...
You need to check if your site code has all the libraries it needs for sending an email. Perhaps if you are using some kind of CMS there will be email functionality in there, and appropriate configuration screens to set, eg. sender address, mail host to send via, etc.
Failing that if its custom code, refer to the above for using email with PHP.
Or look at some custom classes, eg. phpMailer, swiftmailer or similar. Somebody else on here might recommend some classes or function libraries they have used to generate mails.