As already stated, you MUST have mmdf or sendmail installed and configured on your server.
A typical /etc/resolv.conf has:
domain [yourdomain.com]
nameserver [primary dns ip]
nameserver [secondary dns ip]
hostresorder local bind
Of course, you need to set your default gateway. This is done using command route like so:
route add default [ip address]
It is a good idea to add a script in /etc/rc2.d to do this automatically as you boot the server. You can name script something like S190defroute and give it a 755 mode.
Once you have your DNS set and your default gateway identified, you should be able to ping
Doing so and getting a reply means you have external access.
Now, sending the email depends more on your SMTP server than it does on your gateway - SMTP could be configured to use smart relay and simply have a second server do the job.
It would help to know if you are using mmdf or sendmail. I would suggest you look into 'mutt' as your mail agent. Sending attachments with it is very simple and it uses proper MIME headers (using uuencode does not guarantee that receipients will actually get an attachment - they often get a block of text which is impossible to read).
Like more things in our field, there are thousands of ways to skin the cat ... Got a sharp knife?
Just let us know about your topology and versions you're using and we just might be able to provide you more direct assistance.
Regards;
Jose Lerebours
KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours