You might read up a bit on the differences between IMAP, SMTP, and POP3.
IMAP/POP3 are both INBOUND protocols (as in ways to read your mail) while SMTP is outbound (ways to SEND mail).
As for an example of using php to send mail, check out [man]mail[/man] or look into using [man]sockets[/man] to send the message manually.