I'm trying to help populate a newly setup wordpress website and am trying to write scripts to do automated posting of a pre-processed archive of e-mails as a series of posts and comments. I'm completely new to wordpress development and would like to be able to use the wp_insert_post and wp_insert_comment from my remote machine to achieve this. Is it possible?
You can try WP-CLI, WordPress Command Line Interface. If your pre-processed archive is a set of files, you'll be able to create
future posts to be published on specified dates utilizing these files in batch.
All you need to use WP-CLI remotely is SSH terminal and, maybe, some scripting skills.
See also Smashing Magazine review.