While Howard's test via telnet is valid, it only test connection to port and not the full process of sending mail. One would have to go further with aweful commands to test actually sending.
Suggest installing alpine from any repo your CentOS 6.4 server is using. Alpine is the old text based mailer that used to be known as pine.
Once installed, any user that has ssh access to the server can login and launch alpine. From the command prompt, simply enter: alpine [ENTER].
In the alpine config, set it up to use the SMTP server you are using in Moodle. Once that's done, compose a message to some address you can check and test.
Alpine will tell you right away if it can send/relay via SMTP server or not and in inspecting the maillogs ... usually in /var/log/ one might see specific reasons for failure which then gives you a clue as to what to do.
'spirit of sharing', Ken