The reason I didn't want to use sendmail is that I have been told that sendmail is very insecure
Not sure who would have been making such false statements. Most of the internet's mail is delivered via sendmail and has been for like 20 years. Of course you can certainly configure sendmail so it could be insecure but you can do that with anything.
What I want to do is to get PHP-Nuke to be able to send mail without a hitch.
Maybe we should just work from this point. As far as Sendmail being insecure, Fedora ships with a Sendmail configuration that only listens on your loopback adapter (localhost) so you can't even connect to it from an outside machine. It also comes with a default configuration that will not actually work for sending mail out (doubly secure). :) The phpBB forum that we are typing these posts on use the same PHP mail() function to send mail that PHP-Nuke uses. All you have to do is properly configure Sendmail. In my case I only make a couple of simple changes to the /etc/mail/sendmail.mc config file and started sendmail:
# /sbin/chkconfig sendmail on
# /sbin/service sendmail start
Here is a copy of the actual sendmail.mc from this voidmain server:
http://voidmain.is-a-geek.net/files/configs/sendmail.mc
Notice it is configured to listen on 127.0.0.1. That means you can't make an outside connection to sendmail. It also means of course that you can't send mail directly to your server from an outside server. That can certainly be changed if you want it to also be able to receive mail. The most important parts are just changing "voidmain.is-a-geek.net" to whatever your server/domain name is (there are 4 occurances). If you open this file in vim it is nicely color coded and much easier to read.
After you make the above config changes you'll want to test Sendmail before trying to send a message from PHP. You can do this on the command line like so:
$ echo "This is a test message" | mail
you@somewhere.com
Of course change "you@somewhere.com" to a real email address that you can receive mail on. You can check the mail queue to see if it's hung up and can't be sent by:
# mailq
This server is running FC1 by the way.
Now, if you are on Cable or DSL and are having problems getting mail to a lot of places because you are on a banned list, you *can* change one line in this file to have all mail forwarded through an external SMTP server. If you have access to an SMTP server then you would just change the line with the "SMART_HOST" to whatever your external smtp server is, and uncomment the line (remove the leading "dnl"). Don't forget to restart sendmail:
# /sbin/service sendmail restart