There is a generic routine for that here:
Sending an Email in C# with or without attachments: generic routine.[
^] It's is C#, but the translation is pretty simple.
Be aware though, that some web hosts will monitor the outgoing email frequency and count, and may shut you down if they think you are looking like a spambot - so you might not want to send too much, too quick.