Sorry for the late reply just got home from work, unsure if you still require help... Keep in mind I am no programmer I just use to tinker with C++ on FlyFF source code.
wouldn't you need to rewrite the
void CEventLua::KeepConnectEventProcess()
change the void to handle the change from the "SendQueryPostMail"
to something stupid like
if( pUser->CreateItem( &itemElem ) )
but duck if I know what I'm talking about haven't touched flyff source in ages and I'm pretty sure I just pull poop out my butt....
if anything perhaps this will get you on the right track if you where still looking for assistance.