You can use ```$("#mailForm").serialize()``` here instead of collecting the data manually, see http://api.jquery.com/serialize.