that does not work, too... u need have an mx record for your mail server, or noone of those big email-providers(like gmx, web, yahoo, etc) will not accept your requests...
i currently don't have the code though but if you just want to send mails, pop will do that for you.
i have send mails to yahoo using pop. yes gmail doesnt accept that mail because it understands it to be junk or bulk mails and rejects. but i think when you have some basic code, removing that problem will not be a big deal.