How from the Programm (C++ or Java) send mail over the PO ?

Where i can found example ?

Serg