Hi,
if sendmail itself is running on the server and the server has internet access then it should work. If you don't use a custom From: header in the mail function then it might be neccessary to map the email address of the system user under which the web server runs to a real email address. In most cases you can do that by editing the file /etc/mail/genericstable.
Add the following line (adjust the values as needed):
wwwuser auser@mydomain
Then chdir to /etc/mail and execute the command:
makemap hash genericstable.db < genericstable
and restart sendmail.
Alternatively, use a custom From: header with the mail() function.
Another way is to edit /etc/sendmail.cf. There's a section that looks like
"Smart" relay host (may be null)
DS
Change that to
"Smart" relay host (may be null)
DSmailserverhost
where mailserverhost is the full host name or ip address of your mail server.
Mail to external receipients will then be sent to that relay host for delivery.
You might need to do the genericstable stuff in any case if you don't use a custom From: header.
Thomas