📜 ⬆️ ⬇️

How to quickly build mailer for call center

We are organizing a conference for web developers and decided to call Chelyabinsk web studios. It was necessary somehow immediately after the call to send a beautiful letter. It is also important to receive reports on the delivery of letters and the “clickability” of the links (the first in case of a typo, and the second for evaluating the idea). Yes, and all this is needed “yesterday”, but programmers are not available.

Challenge accepted! And the elegant solution is already under the cut ...

In general, the implementation looks like this:

')

1. Get SMTP with Buns


Mandrill is a MailChimp email delivery service. For us, it is important that it provides an SMTP interface and the reports we need. Instead, you can take another similar one. So:

At the same step you should decide on the address from which the letters will leave. I also recommend setting up forwarding letters from there to yourself, since people will write in response to your newsletter.

It is worth noting that at the start you will be available 12,000 free letters and 250 items per hour. Further quota will increase if you do not spam. Or fall, as we do, if you forget to add a link to unsubscribe from the newsletter.

2. Deploy Drupal and set up sending emails.


In order not to complicate the task, I suggest you download the pre-configured build . You just have to unpack the files in the host folder, upload the dump to the database and change the database connection details in the /sites/default/settings.php file (from line 18). Administrator password in the archive.

And a few settings:
  1. Go to / admin / config / system / site-information (Configuration -> Site Information) and specify the email from which you will send emails in the “E-mail Address” field.
  2. And now in / admin / config / system / phpmailer (Configuration -> PHPMailer) and fill in the fields with data from mandrillapp.com/settings/index (here you can also specify your email to check the settings):


  3. The form is available only to authorized users, and the registration of new users is only possible for the administrator, so you need to register accounts (or several) for call center operators. To do this, go to / admin / people / create (Users -> Add user) and fill in all the fields (we don’t put on any role, but it can be convenient to notify about the creation of the account):



    If you make several accounts, you can then look at the productivity of the operators on the Results page (tab on the main page). By the way, yes, the form is displayed as the main page.
  4. Well, it remains to configure the letter itself. In the next step, we will deal with the code of the letter, but for now let's do something test:
    • go to page / node / 6 / webform / emails / 1 (on the form page: Questionnaire -> Configuring Alerts -> Edit next to a single alert) and specify the name and address of the sender, the subject of the letter;
    • in the “E-mail template” field, you can specify something html-containing, later we will return here with our letter code;
    • save everything and send a test invitation (from the main one), the letter should arrive.

    By the way, if you need to send not simple static letters, but something more complicated, you can add fields to the form and insert their value into the letter through tokens.

3. We collect the letter


First of all, I want to remind you that the letters must be specially composed. On Habré many articles on this subject. Perhaps in the comments prompt a tolerable constructor, which allows you to get the letter code. I pulled the code from the mailing list, which we did in the MailChimp analogue (via a link to the web version of the letter). Next time I will try to use github.com/mailgun/transactional-email-templates .

4. Profit!


It remains only to give the operator the address where you deployed the site, username, password and letters flew:



That's all that I wanted to tell you about sending letters to the call center. What do you think, colleagues?

Source: https://habr.com/ru/post/257493/


All Articles