You mean connecting to the smtp server directly and sending via the SMTP protocol? First thing, read:
http://www.rfc-editor.org/rfc/rfc821.txt
Then you can use the fsockopen etc commands:
http://www.php.net/fsockopen
to connect to the server and send mail. Hope that helps.
Chris King