I tried several approaches recomended by others - all worked to a point but had one drawback or another.
Finally hit upon using emailrelay which is a simple SMTP relay. Very simple to set up and works perfectly.
yum -y install openssl-devel
Download source for emailrelay, and compile with openssl so the encrypted connection to SES will work.
./configure --with-openssl
make & make install
I put my SES SMTP credentials (not amazon aws keys) into a file: eg /etc/amazon-ses as a single line thus:
login client <username> <password>
Then run email relay as service using the following...
/usr/local/sbin/emailrelay --as-server --port 10025 --spool-dir /tmp/spool --poll 30 --forward-to email-smtp.us-east-1.amazonaws.com:587 --client-tls --client-auth /etc/amazon-ses --spool-dir /tmp/spool
This will listen on port 10025 for incoming SMTP reqests, spool them to /tmp/spool and every 30 seconds attempt to send them through to amazon SES for delivery. Of course changing these settings is trivial.
In centos I put this in /etc/rc.d/rc.local so it runs at startup. Check your machine is firewalled so external connections to port 10025 are not permitted.
Then, within Moodle, I set up the email plugin to use SMTP address 127.0.0.1:10025 and no authentication details.
One gotcha is that Moodle uses the 'support contact' email address as the sender (not the no-reply address), so this MUST be an address verified through your SES account with amazon.
One of this benefits of this approach is that your Moodle PHP can 'send' email almost instantly - there is no pause waiting for SSL handshaking with a distant machine - and the emails are then spooled to be sent in an orderly way using a different process.
This approach will also work with Gmail and avoids any core hacks. It only takes ten minutes to set up and seems rock solid (so far).
My machine is on Amazon EC2 and Apache is Chrooted which created challenges for communicating with local MTA (no localhost).
Hope it helps...