Well, there are all sorts of problems you can face with your sql mail. Typically you'll test it out, it will work fine, you'll put it in an SP and it will fail on you. Here are some things to look at.
Make sure user is in correct group on msdb database (DatabaseMailUserRole)
If you get a mysterious error like this:
Could not obtain information about Windows NT group/user error code 0xffff0002.
Set the mail account profile to public:
configure database mail
manage profile security