Minimize the chance my email is blocked/filtered as spam
Solution 1:
You can "spoof" their email domain: just make sure they have your mail server's in their SPF records. I do this all the time for clients (on a smaller scale, but I'm sending out hundreds of confirmation e-mails, forum notifications, etc. every day from dozens of different domains; haven't had a problem yet).
Also make sure you have the items mentioned by pQd in place.
Solution 2:
send valid messages - with nice / full headers, proper plain-text part and probably rich-text.
analyze what are the reasons for blocking - if someone uses spamassassin - check which rules were triggered by your mails.
ensure you send mails from server that is not on any blacklist - check it here or here or at other places. if you are blacklisted - find out why and 'drag' your ip out of blacklists.
configure properly rev-dns for your smtp server so it points to existing domain.
make sure you send mails with sender address and return address @valid.domain.com. add spf record to it that permits your smtp to send legitimate messages.
add your self to some white-lists like http://www.dnswl.org/
Solution 3:
From our fearless leader here. Most applies to regular email as well as code.