DEV Community

Cover image for How to send lead emails from your website form?
Tomek Poniatowicz
Tomek Poniatowicz

Posted on

How to send lead emails from your website form?

Web forms reign supreme as a lead generation tool for small businesses. Their popularity stems from several key advantages, one in particular that is overwhelmingly emphasized by all sources - the ease with which they can be integrated into any website. It sounds sensible, but is that where the work with forms ends? Certainly not, on the contrary, this is just the beginning and the hardest part is yet to come.

I have added form to my website, now what?

So you've added a form to your site and are hoping that momentarily leads will start flowing to .... just where? To get responses from online forms you should use two approaches:

  • interfacing with the form of one of the many CRM platforms available on the market.
  • send them as an email

Like everything, each of these has its pros and cons.

Pros and cons

Let's start with CRM. Undoubtedly, it is a convenient way to receive content from online forms, allowing you to define and build a sales process, but CRMs can be very expensive which is often a no go for small companies. Another downside is that it's another tool you have to add to your daily routine and monitor so you don't miss out on new leads.

And how about sending emails? The plus side is that they go straight to your mailbox, so the place you check regularly and the chance of missing them is really low. So far, the biggest drawback has been the difficulty of integration, as setting this up correctly requires integration on the frontend side, but also playing with SMTP server, its correct configuration so as not to fall into blacklists etc. On the other hand, this is no longer a problem because ...

The solution - Mailik.dev

Mailik is a small and easy to use library that allows you to send emails directly from the code of your site with minimal effort (see the documentation). Basically, all you need to do is sign up for a free account, create a project for which Mailik automatically generates a unique key and you point it at your implementation (see example below) ... and you're done.

import Mailik from "@mailik/sdk";

type MailInputType = { body: string; subject: string; replyTo: string };

const handleSubmit = (values: MailInputType) => {
  const res = await Mailik(YOURS_API_KEY).send({
    replyTo: data.email,
    body:`
          Name: ${data.name},
          Message: ${data.message},
          Phone:${data.phone}
        `,
    subject: "Mail subject",
    });
  }

Enter fullscreen mode Exit fullscreen mode

Replies from your website's forms will go straight to the designated mailbox and you will be able to respond to your potential customers (as long as you would collect their emails :)) and convert them into leads for your company!

Mailik dashboard

Final words

These forms serve as a critical point of contact, converting casual browsers into potential customers or subscribers with minimal friction, which is why every online business should make every effort to make this channel of lead acquisition work flawlessly - Mailik.dev has just made it very easy!

Top comments (0)