Mail function.