I haven't done this, but I'd check the specs on the mail queue you're thinking of using and figure out the file permissions and file layout and you should be good to go.
The only issue I can forsee is if the mail queue changes - either the email server changes specs on how the messages are formatted or something as simple as the directory is moved, you will be stuck updating the program. The goal of SMTP is to define a conversation with the email server so you don't have to worry about the little details like message format and queue locations. Using SMTP also will allow you to have your script/program transferred to another server or another platform without much changes.