How can a spammer create an email that can't be deleted on an ipad mail app from an imap server?
If your mum can't delete the mail after restarting or disconnecting from the network and restarting, you can look at one of two


Delete the mails using a webmail interface and then delete the account from the iPad. 
Then contact your ISP/Mail provider if the mail syncs down after you have cleared it from webmail. 


If you can't delete the mail off webmail - then it's 100% on the server side so contact them in that case, too. 

Good luck - you can expect dozens more emails about viagra and more since there's no signs that the hard work that will need to be done to eliminate spam / abusive / promotional / malware laden emails will ever be funded by free email services. Also good news, if this was on a computer, you’d also probably need to remove malware from the computer as that’s usually the end result of these spammy/sticky emails.