That's a tough one--the "magic formula" for avoiding spam is a guarded secret, and Gmail is the best. Here are the general tips for avoiding spam:
Make sure the webserver is a legit company. Many free/cheap webhosts are often blacklisted. So if you pay for something like Godaddy you will have better luck
Make sure you are not doing "spammy" things like asking for information or attaching weird things.
If you are testing, actually respond to your own message. This is important as your inbox will see if you open/engage with certain senders. If you don't it will take future messages and put them into spam.
Any ideas on how to avoid the Gmail spam folder?