Private Message Plugin Question

I need to know where to find the function that inserts the information into the database. I need to enter messages programmatically in the database.