you can send an email $to anyone, anywhere. however, you@localhost won't cut it. $from must be a valid account on your system with the fqdn (fully qualified domain name). on my computer i have a user setup as "sales" and my email being sent from the website is sales@renderbar.com...$from = "sales@renderbar.com"
sales won't cut it, sales@localhost won't cut it. make sure $from is equal to a valid system account and that your fqdn is a virtual smtp server name or alias.
my default smtp server account is "mail" and, as standard practice, it has two aliases: "mail.renderbar.com" and "renderbar.com". any of these should work...
sales@mail
sales@mail.renderbar.com
sales@renderbar.com
iis looks up the sales account in the domain and/or its aliases if need be. if it doesn't find the account, it won't send the email...it will move it to the badmail folder.
a little long winded but hopefully gets you going. there is a great explaination of the ins and outs of smtp, including how mx records work and mail routing, on the link i provided in my first post about the free pop3 service.
hth,
steve
ps. you can go to:
http://www.renderbar.com/secure/download.php
and click the "download" button...a link will then appear at the very bottom of the page that says:
"If you need a trial license, please click this link."
click it, input your email address, then click the "email trial license" button. you will get an email that was sent using the exact code i printed in my last post.