You've not mentioned the linux operating system 'flavor' OR if Moodle is hosted locally or remotely, so the following might apply ONLY if hosted locally (CentOS or Red Hat Enterprise) and one has full access to the server - including ssh as root user and sendmail config.
Much depends upon mail servers and how one has configured Moodle to handle mail. IF using an SMTP server (mail from Moodle goes directly to the SMTP server in Moodle config), control of the flow of mail is ALL on the SMTP server. SMTP server must be configured to retain failed deliveries in outgoing mail ques for X number of days and to attempt delivery every so often. IF not configured that way and it cleans mailques, only option is to re-post in forum.
IF using local sendmail on the Moodle server itself, typically sendmail (on CentOS and RHE servers) is configured to attempt delivery of failed messages for 5 days IF the outgoing mailques have not been cleared out via some other system (commandline) method.
Qued messages are stored in /var/spool/mqueue. One can view via the command line 2 files related to a single message. One contains the status, the other contains the message. IF the issues related to the receiving mail server are resloved, one can either wait until the config'd time to try again OR one can restart the sendmail via command line:
/sbin/service sendmail restart
Then one could watch logs in a terminal window/session to see if the mail is being delivered or still has issues.
As root user: tail -f /var/log/maillog [ENTER].
One would/should see log references like the following:
[root@hostname mqueue]# tail -f /var/log/maillog
Jun 26 04:02:54 hostname sendmail: p5Q92raa008260: firstname.lastname@example.org, ctladdr=<email@example.com> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=73679, relay=[somedomainname]. [someIPaddress], dsn=2.0.0, stat=Sent (p5Q92rHV004912 Message accepted for delivery)
Watching and/or checking those logs does also give one clues as to mail issues - thus approaches to resolution of problems.
Again, my response qualified and conditional upon running Moodle on a 'Red Hat' flavored server and to which you have access via ssh as root user. If the 'flavor' of the OS is 'other' (like Ubuntu or SuSE), consult related manuals for that OS via Google.
'spirit of sharing', Ken