Couldn't you just... going off a guess haven't really looked into it, use a SQL query to send the mail? You could probably even add a slot for items / gold... like..
Delare the variables for the subject, body, and recipient.(EDIT: and attachment) Then make a string as a Query builder, and then, insert the query into the table...? I''lll look into it.
----;'`-- Edit--`';
---/ New Issue. \\
--(___Times___)
The only part i am having trouble on is the sent time and the expire time, as mangos uses some different string of numbers to represent dates...?
other than that, you could build a form that acts as a query builder to insert into Item_Text, Mail, and Mail_item(?), tables, since they are all in the characters db, it shouldn't be too hard, should it?