Do you want the contents mailed right then? Or is it like for a newsletter and get mailed once a week (or month)? Can you supply just a little more info? But basically, I would think that if you can send an email and query a database and show results on your pages, then you could just as easily query the db and use the results as the message of your outgoing email... fairly easily...