you can send one from a console command in unix, via a system or similar command. Or via libraries.
you can tap into window's libraries in windows.
Its not part of the language as a built in command, but its certainly possible. You can even do it yourself the hard way, write the correct Ethernet and mail server stuff to do it, but that is a bit of work...