If you set this to remote host (for example, the SMTP host from your ISP) and your remote host requires that you authenticate before sending messages (SMTP authentication -- or POP before SMTP authentication), then you cannot use the mail() function, as it does not provide this functionality.
2. You install a local SMTP server. If you have IIS installed, I believe it comes with a mail server option. If not, you can always find a email server for Windows by googling.
3. You can use many external libraries (such as phpmailer.sf.net) which allow you to use a remote SMTP server and provide addional funcitonality, such as SMTP authentication.
Hope this helps.
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise
phpmailer is a marvellous bit of open-source software and enables you to do almost anything you could want to do, including adding attachments and sending HTML messages. And yes, it should work from your PC!
Hi guys, thanks for the adivce. I have been playing about with phpmailer.
My own PC (running XP) doesn't have an email server or anything like that. I am unsure if I am still able to use phpmailer on my PC to connect to our SMTP server. Is this do-able with phpmailer ?? Can't seem to see anything in the documentation that says I can't. Also I noticed that phpmailer doesn't deal with authenticating SMTP, you just bang in the server host, but no password.
There's an example on using authentication at the bottom of the page, couldn't be easier. In fact you could just grab that example code to test it on your PC. Try it out, it's really great, phpmailer seems to have everything I've ever wanted for sending out emails (including keepalive!).
You're not providing us with the full error text; what comes after "the following email address failed"? That's wherein the key will lie.
Probably the most common cause of this is sending into a cpanel server running Exim. Exim will check to see whether the domain is under it's control, and if so, it will then check to see whether the sender actually exists. If not, it will bounce the mail. It took me ages to solve this when I first encountered it, so don't feel bad. So it may be worthwhile creating the account you are sending from and seeing if that helps.
I am wondering if emailing from the local machine is really going to be a good idea, as my clients who use the program may also have email restrictions on their server. The IT dept for our clients are not going to change any settings for their needs that's for sure. It's just I've tried 2 accounts an neither work so far. I was surprised that the Yahoo one didn't work though.
So from this error, can you deduce the exact problem? Is it indeed a restriction from the server?
It may be that the only way I can solve the problem is for them to swith to the online server version of the program to send email