Well, if this was a programming question, I'd expect it to come with some code. I would guess that you're using your own mail server, and it's refusing to send the mail on, or you work for a notorious generater of spam, and therefore your server has been blocked by both gmail and yahoo.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.