Generating Unique Coupone Codes

Dear all,
Making the campaign I face myself with question how to generate unique codes and send them to customer in email, without doing it manualy. Could you please advice or help share any information ? all information much appreciated