From 859aa6df4854e285236f23a515d2bc713f16bf9e Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Thu, 5 Oct 2017 11:35:53 +0100 Subject: [PATCH] Cosmetics, clarification --- README.md | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 20cc346..066537c 100644 --- a/README.md +++ b/README.md @@ -26,30 +26,31 @@ For example: ```erlang {rabbitmq_email, [ - % gen_smtp server parameters - % see https://github.com/Vagabond/gen_smtp#server-example + %% gen_smtp server parameters + %% see https://github.com/Vagabond/gen_smtp#server-example {server_config, [ [{port, 2525}, {protocol, tcp}, {domain, "example.com"}, {address,{0,0,0,0}}] ]}, - % how clients are authenticated; either 'false' or 'rabbitmq' (default) + %% how clients are authenticated; either 'false' or 'rabbitmq' (default) {server_auth, rabbitmq}, - % whether STARTTLS shall be offered; either 'true' or 'false' (default) + %% whether STARTTLS shall be offered; either 'true' or 'false' (default) {server_starttls, true}, - % inbound email exchanges: [{email-domain, {vhost, exchange}}, ...} + + %% maps inbound email domains to vhosts and exchanges: [{email-domain, {vhost, exchange}}, ...} {email_domains, [{<<"example.com">>, {<<"/">>, <<"email-in">>}} ]}, - % outbound email queues: [{{vhost, queue}, email-domain}, ...] + %% outbound email queues: [{{vhost, queue}, email-domain}, ...] {email_queues, [{{<<"/">>, <<"email-out">>}, <<"example.com">>} ]}, - % sender indicated in the From header + %% sender indicated in the From header {email_from, <<"noreply">>}, - % sender indicated in the SMTP from + %% sender indicated in the SMTP from {client_sender, "rabbitmq@example.com"}, - % gen_smtp client parameters - % see https://github.com/Vagabond/gen_smtp#client-example + %% gen_smtp client parameters + %% see https://github.com/Vagabond/gen_smtp#client-example {client_config, [ {relay, "smtp.example.com"} ]} @@ -110,9 +111,9 @@ The adapter listens for incoming emails. When an email arrives at the adapter, its SMTP "To" address is examined to determine how it should be routed through the system. First, the address is split into a mailbox name and a domain part. - - the domain part (e.g. "`@rabbitmq.com`") is used to map to an - AMQP virtual-host and AMQP exchange name - - the mailbox name is mapped to an AMQP routing key + - the domain part (e.g. "`@rabbitmq.com`") is used to map sender's address to a + RabbitMQ virtual host and exchange name + - the mailbox name is mapped to an AMQP 0-9-1 routing key To receive the incoming emails, simply bind your queue(s) to this exchange. For example: