Your internet provider should provide POP and SMTP servers for your own use. Simply plug those into an existing script for it to work.