Sending email?

Sending email that will actually be delivered is actually quite tricky, because of the fight against spam, senderscores, honeypots, and all the rest.

If you want to send email on a server, you can use popen() to call the “sendmail” application and give it your email contents (assuming Linux server.) Then you can set your server/host up to use whatever hosting provider email delivery you get with your hosting plan.
If you want to send from a client, then you need to hook into the email server that the user’s ISP uses, and typically also the ISP name/password for the user.
This is, again, because most email forwarders don’t accept email from any random computer on the internet.

Finally, if you are really hell-bent on allowing people to send email, from the client, then the best option is probably to build a web service that sends email, and POST the email information to that service, to send the email. That’s almost 100% non-Unreal code at that point, except for the part that POSTs a web request to your web service.
However, if you build a web service like that, it will only be a few weeks before the spammers of the world find out about it, and start POST-ing their spam emails to your service, so you have to keep that in mind.
Best is to make the actual text of the message be hard-coded on the server, and just accept a list of email addresses in the POST request; that way spammers have less incentive to use it (but not zero, for various arcane email deliverability reasons.)

My suggestion is to be more specific about why you want to do this. Is this for a “viral invite loop?” If so, wouldn’t it be better to use an existing contact network, like Facebook, Google Plus, and Steam? Those networks have their own SDKs for dealing with messaging and invites.
Also, the mass market doesn’t use email particularly much – sending phone SMS messages is likely a better avenue if you want an invite system that works with modern human beings.

We can’t really answer your question better unless you give us more information.