The meaning of the taslim (greeting of peace) at the end of the prayer means security, that is, anyone who carries out the command of Allah and the sunnah of His Prophet out of humility to Him and showing fear, has security from the tribulations of this world and freedom from the punishment of the next world. Al-Salam (peace) is one of the names of Allah, which He entrusted to His creation so that they would make use of it in their behaviour, trusts and contracts; in confirming their companies and assemblies; and for the soundness of their social relations.
If you want to establish this salam in its proper place, and to fulfill its meaning, then fear Allah; and make your faith, your heart, and your intellect sound. Do not sully them by the injustice of acts of rebellion. Let your guardians be safe from you; do not weary, or bore or alienate them through your bad behaviour towards them, nor with your friend, nor with your enemy. If those who are close to someone are not safe from him, then those furthest from him are safest. Anyone who does not establish salam on the occasions when it should be established has no peace and no submission: he is a liar in his salam, even if he uses it as a form of greeting among people.
Know that man's existence lies between trials and afflictions in this world. Allah may test him with blessings, to see his thankfulness, or with hardship, to see if he will show steadfastness and nobility by obeying Him, or disgrace in rebelling against Him, although there is no way to reach His good pleasure and mercy except through His grace. The only means to obey Him is when he grants success: none can intercede with Him except with His permission and mercy.