How to delete mail use google app script

This is the way to erase all of the mails for the time being. You can only get up to 500 in one run

How to delete mail use google app script