I am using phps mail() function to send confirmation e-mails.
The e-mails get received on gmail and others as far as I\'m aware, the only real problems I\'ve had is
Using PHPMailer, or swiftmailer or any other library won't increase your delivery rates in most cases: the most likely culprit is your server set up.
Sending email successfully is notoriously difficult, have a read here: http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html for a basic overview of what's necessary.
Yahoo in particular really wants DKIM set up, and if your ISP hasn't done this for you, or you are on a VPS, can be a real pain.
Sucessfully sending email takes quite a bit more then simply not being on blacklists. The default of many ISPs it so assume you are SPAM until you have things set up that would make them think otherwise. Guilty until proven innocent.
In the codinghorror post, take note of this passage:
Port25 offers a really nifty public service -- you can send email to check-auth@verifier.port25.com and it will reply to the from: address with an extensive diagnostic!
I had to use an alternate address for the test to work; check-auth2@verifier.port25.com. You can read the details of why to test with each address here: http://www.port25.com/domainkeys/
In the long run, if you're sending transactional email (ie. not mass mailings but email in response to a user action) I recommend a service like postmark (postmarkapp.com) because at 1/10th of a cent per email, you get all the ugly taken care of for you.