How can you ensure that the email you send via programming is not automatically marked as spam?
This is a tricky one and I have always used techniques such as permission-based emails (e.g. only sending to people who are allowed to send) and not using blatant terminology.
Recently, some of the emails I have been sending programmatically have been automatically mixed into people's junk folders and I wonder what I can do about this.
This is despite the fact that these emails are not ones that humans would mark as spam, in particular, they are emails containing licence keys that people have paid for, so I don't think they will consider them spam
I think this is an important topic in which I'm essentially an ignoramus.
Use email authentication methods, such as SPF and DKIM, to prove that your emails and domain name are associated and to prevent spoofing of your domain name. The SPF website includes a wizard to generate DNS information for your site.
Check your reverse DNS to ensure that the IP address of your mail server points to the domain name you use to send mail.
Make sure the IP address you are using is not blacklisted
Make sure the reply-to address is a valid existing address.
Use the recipient's full real name in the To field, not just the email address (e.g. "John Smith").
Monitor your abuse accounts, such as firstname.lastname@example.org and email@example.com. This means - make sure these accounts exist, read what is sent to them and respond to complaints.
Finally, make it very easy to unsubscribe. Otherwise, your users will unsubscribe by hitting the spam button, which will affect your reputation.