I'll do my best to answer... note that I could be entirely wrong and setting up your own MTA on your laptop might be just as easy. The following is just based on the route I've taken before! Anyway, on to your questions:
amy.damnit wrote:So it would be a pain to set up my own SMTP server from my laptop?
Other than the fact that I've never done it, it's more than just a 'pain' - it's a situation where you're risking all of your e-mails being marked as spam by certain providers (e.g. Yahoo, Hotmail, etc.). Unless you did something like 'From: test@[your_ip]' or something (which is technically valid, according to the RFC's IIRC, though I'm not sure how many providers will support it), and unless you own your own domain name that has a valid record pointing to your IP (e.g. an SPF record), using your ISP's e-mail server (and using the e-mail provided by your ISP as the 'From' header) will at least let you send out valid, non-spoofed e-mails for testing.
amy.damnit wrote:Can you do that?
Will that work with an ISP (e.g. Verizon, AT&T, etc) where you have a POP3 account?
Will that work with a free e-mail service like Yahoo, GMail, Hotmail?
The PHPMailer class is essentially doing the exact same thing an e-mail program such as Outlook would do; connect to an SMTP server, authenticate, send the e-mail message. There's really no difference (other than the various e-mail headers Outlook might send, but then again you can duplicate these using PHP) despite the fact that you're using PHP to do it.
All you need is access to the provider's SMTP servers to send e-mail out using their server. So yes, if you have POP3 access you most likely have SMTP access, which includes your ISP and GMail. Yahoo and Hotmail don't allow free SMTP access, however.
amy.damnit wrote:What would I have to have from an ISP that is a Web-Host in order to send and receive mail?
Not sure what you're asking; all you need in order to send e-mail via an SMTP server is: the address of the SMTP server (e.g. smtp.google.com), and the username/password details if required to authenticate (which you will, with most SMTP servers like GMail and your ISP's).
amy.damnit wrote:Are you saying I would have to buy web-hosting and have a domain?
No, I was referring to the day you finally you got your own website or uploaded your scripts to someone else's. I assumed that you wouldn't just be tinkering around with PHP on your laptop forever. :p
amy.damnit wrote:Would a web-host let me send e-mails?
Well a very good majority of them do, yes. Be careful with shared hosting, however; it's not uncommon to see all domains on a given webhost get blacklisted simply because one of them was a spam/advertising domain. Shared hosting means you share not only space on the servers but also the reputation of the least reputable site hosted.
amy.damnit wrote:Is that hard and/or expensive?
If a shared host does allow it, it should be free (and if not - find a different host :p). The only time it might cost you is if you upgrade and decide to get your own private server (virtual or not) - those are a bit more pricey than a shared hosting plan. Normally by the time you're looking at upgrading to a dedicated server, however, it's because your site(s) have expanded and require more resources than a shared host can offer - not just because of e-mail issues (normally - there are exceptions to every rule, I s'pose).
amy.damnit wrote:Is there something wrong with using PHP's mail( ) command?
No, as long as the server you're using it on has its own MTA or you're using an SMTP server that doesn't require authentication or SSL. That last clause there eliminates just about every ISP (and GMail), which is why I said you'll have to resort to using a 3rd-party application such as PHPMailer.
Once you get setup with an actual host, they'll no doubt have their own MTA installed (e.g. sendmail, qmail, etc.) and you could then switch back to using the [man]mail/man command if you wanted. Otherwise, if you've gotten used to the extra functionality of the SMTP class (e.g. PHPMailer), you could most likely continue using it - you'd just point it to "localhost" instead of some external SMTP server.
amy.damnit wrote:You mentioned "class", so that means I would have to learn and use Object-Oriented Programming (OOP)?
Well, you would be using OOP more than likely, yes, but you can easily cheat your way out of learning OOP before ever using it; popular apps like PHPMailer have plenty of examples that you can simply copy, paste, and modify. The syntax might seem foreign at first, but you'll at least have been exposed to OOP (manual: [man]oop5[/man]) before you delve into learning it fully (which, I might add, you definitely should - there's plenty of discussion about how applications could benefit greatly from OOP).
amy.damnit wrote:Maybe the whole sending e-mail from a PHP website (e.g. to send password re-sets, registration welcomes, etc) is too complicated for me as a newbie?!
It's not as simple as it seems, no. The presence of a simple mail() command is very misleading; in order to send a proper e-mail, you have to take into consideration all of the various e-mail headers that make an e-mail look valid (and not a piece of spam that should be trashed immediately).
If I can leave you with one piece of advise, it's this; if you have forms that send out e-mails, look into using a strong CAPTCHA to prevent spam/abuse. Also, never set the "From" header to a user-defined e-mail; it might seem nifty to send e-mails to their friends and have the "From" field set to their e-mail address, but this is one way to get yourself flagged as an open relay and blacklisted (meaning your e-mails might be flagged as spam simply because you sent them - not their content/headers/etc.).
(Oops, I guess that's two pieces of advise I had in mind!)
Whew, sorry for writing a book - hope I answered your questions (and, no doubt, sparked a couple more :p).