You can run a dryer vent through the attic under the International Residential Code. It would fill your attic with warm, moist air that could rot the framing and ruin the insulation, and lint from the dryer could create other problems.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.