Send Receive Mails

Hi All,

I am writing one script to automate one long process. In this process we need to upload some input files and download some output files. So , I want to automate this upload and download by using mail functionality.

I want to trigger this script when I am sending mail to server. I know how to send mail but I dont know how to send mail to server from our outlook and how to receive mail (want to receive input file).

Hope you guys can help me out in this. Thanks in advance..!