Send email with smtp

Hi, i have an application that needs to send emails from a server with smtp, how can i do this?