PWeerakoon, please improve your research before giving advice :)
pakdude,
Do not use the URL in the DNS unless you plan to fubar your email!! and there is no need for any scripts.
You can find the links in your control panel, but I provide you with direct links in case you get lost.
Inside your Apps control panel, go to the MX records instructions found here
https://www.google.com/a/cpanel/mydomain.com/SetupMXInstructionsAfter you are done, go here to set up your vanity shortcut
https://www.google.com/a/cpanel/mydomain.com/CustomUrl?s=mail