Connect with us

MARKETING

How to Create an HTML Form That Sends You an Email

Published

on

How to Create an HTML Form That Sends You an Email

Have you ever set up a form on your site, only to lose track of the information? Creating an HTML email form is an effective way to resolve this issue.

Convert anonymous visitors into leads. Try HubSpot Forms free.

Below, you’ll learn how to create a form that sends an email to you, as well as the customer, after a submission. This simple trick will help you build a seamless inbound strategy.

Table of Contents

Ideally, browsers would allow you to route form submissions directly to an email address. However, the reason they don’t is that emailing directly from an HTML web form would reveal the visitor’s email address, making the user vulnerable to malicious activities, such as phishing.

Further, HTML doesn’t offer an option to create a form that sends an email after submission. Instead, you can use the form action element to set a mailto: address (in this case, your own), triggering the submitter’s mail client to open. This is a last-ditch option if you can’t create a PHP-based form.

However, there are a few problems with the mailto: option.

  • It isn’t 100% compatible with all browsers.
  • The process isn’t very user-friendly.
  • You can’t control the formatting of the data when the form is sent by the browser.
  • A warning message will pop up when the user submits the form, letting them know that the information they’re about to send will not be encrypted for privacy.

Instead, you’ll want to look for alternative ways to send an email from a form, which we will discuss below.

How to Make an HTML Form that Sends Email

There are multiple options for creating an HTML form that emails you when a new entry is submitted. The option you choose depends on how you work and what platform you’re using.

This is to say that things are a little different if the plan is to use a mix of HTML and different scripts. Choose the option that works best with your team’s skillset.

Method 1: Create an Email Send Form Using HTML (Not Recommended)

Using just HTML? If you’re starting fresh, our team is here to help. This code will help you create a form that will notify you via email.

The form will ask for the contact’s name and message. It also includes a submit button (not visible in CodePen) that users will click to submit their information.

Note that this code is basic. It won’t look super snazzy. For a more visually appealing form that matches your branding, you’ll have to add lines of code specific to your needs.

Remember: While you can use just basic HTML, this isn’t the ideal option. This form doesn’t directly send to email addresses but rather opens an email client or tool window to submit the form. This can spook the user out of submitting the form at all.

So, what HTML code allows you to send form submissions directly to an email address?

To make the form work with your email server and send it to a mailbox, PHP is the answer. Let’s explore that option now.

Method 2: Create an Email Send Form Using PHP (Advanced)

To create a form that sends an email, PHP is going to be your best friend. PHP stands for Hypertext Preprocessor, and this language collaborates with HTML to process the form.

Before jumping into the process, let’s break down a few form basics.

PHP Forms: What You Need to Know

A web form has two sides: The frontend, seen in the browser by visitors, and a backend script running on the server.

The visitor’s web browser uses HTML code to display the form. When the form is submitted, the browser sends the information to the backend using the link mentioned in the “action” attribute of the form tag, sending the form data to that URL.

For example: <form action=https://yourwebsite.com/myform-processor.php>.

The server then passes the data to the script specified in the action URL — myform-processor.php in this case. Using this data, the backend script can create a database of form submissions, direct the user to another page (e.g. payment), and send an email.

There are other scripting languages you can use in backend programming, like Ruby, Perl, or ASP for Windows. However, PHP is the most popular and is used by almost all web hosting service providers.

If you’re creating a form from scratch, here are the steps you can take.

Step 1: Use PHP to create a page.

For this step, you’ll need to have access to your website’s cPanel on your hosting platform.

When you’re creating a webpage, instead of using the “.html” extension, type “.php” instead. This is similar to what happens when you save an image as “jpg” versus “png.”

By doing this, the server will know to host the PHP you write. Instead of saving the empty HTML page as such, save it as something like this: “subscriberform.php”. After your page is created and saved, you’ll then be able to create the form.

Step 2: Make the form using code.

In this step, you’ll write the code to create the form.

If you’re not sure how to create forms in HTML, check out HTML Dog’s resource for a primer on the basics.

The following code is what’s needed for a basic form:

 

<form method="post" action="subscriberform.php">

<textarea name="message"></textarea>

<input type="submit">

</form>

Because this is similar to the HTML-only write-up, these lines will also create a name for the form and an area for subscribers to type a custom message and send it to you.

An important difference is the action=”subscriberform.php” part. This portion of code is what will make the page send the form when submitted.

Step 3: Make the form send an email.

After you create the form and add all the proper fixings depending on your design preferences, it’s time to create the email portion.

For this, you’re going to scroll to the beginning of the page (the very beginning, even before defining the HTML Doctype). To enable sending data in the email, we have to add code that will process the data. Copy this code or create something similar:

 

<?php

if($_POST["message"]) {

mail("[email protected]", "Here is the subject line",

$_POST["insert your message here"]. "From: [email protected]");

}

?>

Everything inside the first and last lines will tell the webpage to make these functions perform as PHP. This code also checks to see if a subscriber uses the form. From there, it checks to see if the form was sent.

Further breaking it down, “mail” sends the completed form as an email to “[email protected],” and the subject line is what follows. In the next line, you can write a copy of the email message inside the quotes, to be sent from whichever email address you choose.

Once the form is submitted, the page sends the data to itself. If the data has been successfully sent, the page sends it as an email. The browser then loads the page’s HTML — the form included.

With that, you have the basic code you need to create the form.

Note that this is just one way to do this. Alternatively, you can also create a form using a builder, and then embed it on your website.

Method 3: Create an Email Send Form Using a Form Builder

If you’re not using WordPress to build your website and are not coding-savvy, you may be at a loss as to how you can create a form. This is especially true if your CMS doesn’t offer a drag-and-drop page editor.

Each of the tools below allows you to build a form that sends an email without any coding. The best part is that you don’t need to change content management systems if you don’t want to. Instead, you can embed the form on your website using each tool’s embed code.

(Pro tip: A drag-and-drop editor can make it much easier and simpler to create an email-sending form. Try CMS Hub. It’s 100% free!)

1. HubSpot: Best Email Form Builder Overall

html email form builder, HubSpot

HubSpot includes a form builder in the free tier of all of its products. Because HubSpot already has your email, it will automatically send you a message when a new entry is submitted.

HubSpot’s form builder is linked with other tools in the platform, including Marketing Hub and CMS Hub. Plus, you don’t need any special technical knowledge. If you want to extend the form to include marketing capabilities, you can do so as well.

For example, you can build custom forms that connect to your contacts list. You can also customize those forms and trigger automatic emails based on the completion of your forms. (Note that the latter requires a premium upgrade.)

If you want to learn how to receive an email after a form submission, take a look at our Knowledge Base article.

2. Forms.io: Best Quick Email Form Builder

html email form builder, Forms.io

Forms.io allows you to quickly create a form in its drag-and-drop interface. Then, you can embed the form on your site using an HTML embed code. You’ll receive an alert or notification, and you can then manage responses in the tool’s backend.

It’s free for 10 users. If your company needs more seats, you can have access for $14.99/month.

3. Jotform: Best Email for Builder for Multiple Forms

html email form builder, jotform

If you expect that you’ll need more than one form, Jotform is a great choice. It gives you several options for embedding forms on your website: JavaScript, iFrame, or the entire source code of the form. You also have the option of creating a lightbox or popup form.

Jotform is free with its branding. Pricing starts at $24/month if you want a water-mark free form.

Check out more form builders here.

Method 4: Create an Email Send Form Using a Plugin

If you’re running a WordPress website, we have good news: You have a plethora of form builder plugins available to you, most of which are free. These tools will all send an email upon receiving a submission.

1. HubSpot Form Plugin: Best for Lead Generation

If you’re planning to use your form as a lead generation tool, then we highly recommend using the HubSpot form plugin. It links directly to your HubSpot account, allowing you to use it in conjunction with HubSpot CRM, Marketing Hub, Sales Hub, and more.

html email form plugin, HubSpot

2. WPForms: Best for Embedding Anywhere

WPForms is a drag-and-drop form builder that allows you to configure it to email you upon receiving a submission. You can also embed the form anywhere on your site, including the sidebar and footer.

html email form plugin, WPForms

3. ARForms: Best for Adaptability

ARForms allows you to receive email notifications based on conditions you’ve set, but you can also get email notifications for all submissions. You can also integrate it with other tools in your tech stack, including HubSpot, PayPal, and Google Sheets.

html email form plugin, ARForms

The Importance of HTML Forms that Send Emails

Whether you want to convert more visitors to leads, collect information for your sales team, or create loyal brand advocates, forms are imperative to an inbound strategy.

If you don’t have a form that sends emails, you could be missing out on more leads, increased conversions, and engaged customers.

Start leveling up your forms today.

Editor’s note: This post was originally published in December 2019 and has been updated for comprehensiveness.

New Call-to-action

 

Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address

MARKETING

Why We Are Always ‘Clicking to Buy’, According to Psychologists

Published

on

Why We Are Always 'Clicking to Buy', According to Psychologists

Amazon pillows.

(more…)

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

MARKETING

A deeper dive into data, personalization and Copilots

Published

on

A deeper dive into data, personalization and Copilots

Salesforce launched a collection of new, generative AI-related products at Connections in Chicago this week. They included new Einstein Copilots for marketers and merchants and Einstein Personalization.

To better understand, not only the potential impact of the new products, but the evolving Salesforce architecture, we sat down with Bobby Jania, CMO, Marketing Cloud.

Dig deeper: Salesforce piles on the Einstein Copilots

Salesforce’s evolving architecture

It’s hard to deny that Salesforce likes coming up with new names for platforms and products (what happened to Customer 360?) and this can sometimes make the observer wonder if something is brand new, or old but with a brand new name. In particular, what exactly is Einstein 1 and how is it related to Salesforce Data Cloud?

“Data Cloud is built on the Einstein 1 platform,” Jania explained. “The Einstein 1 platform is our entire Salesforce platform and that includes products like Sales Cloud, Service Cloud — that it includes the original idea of Salesforce not just being in the cloud, but being multi-tenancy.”

Data Cloud — not an acquisition, of course — was built natively on that platform. It was the first product built on Hyperforce, Salesforce’s new cloud infrastructure architecture. “Since Data Cloud was on what we now call the Einstein 1 platform from Day One, it has always natively connected to, and been able to read anything in Sales Cloud, Service Cloud [and so on]. On top of that, we can now bring in, not only structured but unstructured data.”

That’s a significant progression from the position, several years ago, when Salesforce had stitched together a platform around various acquisitions (ExactTarget, for example) that didn’t necessarily talk to each other.

“At times, what we would do is have a kind of behind-the-scenes flow where data from one product could be moved into another product,” said Jania, “but in many of those cases the data would then be in both, whereas now the data is in Data Cloud. Tableau will run natively off Data Cloud; Commerce Cloud, Service Cloud, Marketing Cloud — they’re all going to the same operational customer profile.” They’re not copying the data from Data Cloud, Jania confirmed.

Another thing to know is tit’s possible for Salesforce customers to import their own datasets into Data Cloud. “We wanted to create a federated data model,” said Jania. “If you’re using Snowflake, for example, we more or less virtually sit on your data lake. The value we add is that we will look at all your data and help you form these operational customer profiles.”

Let’s learn more about Einstein Copilot

“Copilot means that I have an assistant with me in the tool where I need to be working that contextually knows what I am trying to do and helps me at every step of the process,” Jania said.

For marketers, this might begin with a campaign brief developed with Copilot’s assistance, the identification of an audience based on the brief, and then the development of email or other content. “What’s really cool is the idea of Einstein Studio where our customers will create actions [for Copilot] that we hadn’t even thought about.”

Here’s a key insight (back to nomenclature). We reported on Copilot for markets, Copilot for merchants, Copilot for shoppers. It turns out, however, that there is just one Copilot, Einstein Copilot, and these are use cases. “There’s just one Copilot, we just add these for a little clarity; we’re going to talk about marketing use cases, about shoppers’ use cases. These are actions for the marketing use cases we built out of the box; you can build your own.”

It’s surely going to take a little time for marketers to learn to work easily with Copilot. “There’s always time for adoption,” Jania agreed. “What is directly connected with this is, this is my ninth Connections and this one has the most hands-on training that I’ve seen since 2014 — and a lot of that is getting people using Data Cloud, using these tools rather than just being given a demo.”

What’s new about Einstein Personalization

Salesforce Einstein has been around since 2016 and many of the use cases seem to have involved personalization in various forms. What’s new?

“Einstein Personalization is a real-time decision engine and it’s going to choose next-best-action, next-best-offer. What is new is that it’s a service now that runs natively on top of Data Cloud.” A lot of real-time decision engines need their own set of data that might actually be a subset of data. “Einstein Personalization is going to look holistically at a customer and recommend a next-best-action that could be natively surfaced in Service Cloud, Sales Cloud or Marketing Cloud.”

Finally, trust

One feature of the presentations at Connections was the reassurance that, although public LLMs like ChatGPT could be selected for application to customer data, none of that data would be retained by the LLMs. Is this just a matter of written agreements? No, not just that, said Jania.

“In the Einstein Trust Layer, all of the data, when it connects to an LLM, runs through our gateway. If there was a prompt that had personally identifiable information — a credit card number, an email address — at a mimum, all that is stripped out. The LLMs do not store the output; we store the output for auditing back in Salesforce. Any output that comes back through our gateway is logged in our system; it runs through a toxicity model; and only at the end do we put PII data back into the answer. There are real pieces beyond a handshake that this data is safe.”

Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

MARKETING

Why The Sales Team Hates Your Leads (And How To Fix It)

Published

on

Why The Sales Team Hates Your Leads (And How To Fix It)

Why The Sales Team Hates Your Leads And How To

You ask the head of marketing how the team is doing and get a giant thumbs up. 👍

“Our MQLs are up!”

“Website conversion rates are at an all-time high!”

“Email click rates have never been this good!”

But when you ask the head of sales the same question, you get the response that echoes across sales desks worldwide — the leads from marketing suck. 

If you’re in this boat, you’re not alone. The issue of “leads from marketing suck” is a common situation in most organizations. In a HubSpot survey, only 9.1% of salespeople said leads they received from marketing were of very high quality.

Why do sales teams hate marketing-generated leads? And how can marketers help their sales peers fall in love with their leads? 

Let’s dive into the answers to these questions. Then, I’ll give you my secret lead gen kung-fu to ensure your sales team loves their marketing leads. 

Marketers Must Take Ownership

“I’ve hit the lead goal. If sales can’t close them, it’s their problem.”

How many times have you heard one of your marketers say something like this? When your teams are heavily siloed, it’s not hard to see how they get to this mindset — after all, if your marketing metrics look strong, they’ve done their part, right?

Not necessarily. 

The job of a marketer is not to drive traffic or even leads. The job of the marketer is to create messaging and offers that lead to revenue. Marketing is not a 100-meter sprint — it’s a relay race. The marketing team runs the first leg and hands the baton to sales to sprint to the finish.

​​

via GIPHY

To make leads valuable beyond the vanity metric of watching your MQLs tick up, you need to segment and nurture them. Screen the leads to see if they meet the parameters of your ideal customer profile. If yes, nurture them to find out how close their intent is to a sale. Only then should you pass the leads to sales. 

Lead Quality Control is a Bitter Pill that Works

Tighter quality control might reduce your overall MQLs. Still, it will ensure only the relevant leads go to sales, which is a win for your team and your organization.

This shift will require a mindset shift for your marketing team: instead of living and dying by the sheer number of MQLs, you need to create a collaborative culture between sales and marketing. Reinforce that “strong” marketing metrics that result in poor leads going to sales aren’t really strong at all.  

When you foster this culture of collaboration and accountability, it will be easier for the marketing team to receive feedback from sales about lead quality without getting defensive. 

Remember, the sales team is only holding marketing accountable so the entire organization can achieve the right results. It’s not sales vs marketing — it’s sales and marketing working together to get a great result. Nothing more, nothing less. 

We’ve identified the problem and where we need to go. So, how you do you get there?

Fix #1: Focus On High ROI Marketing Activities First

What is more valuable to you:

  • One more blog post for a few more views? 
  • One great review that prospective buyers strongly relate to?

Hopefully, you’ll choose the latter. After all, talking to customers and getting a solid testimonial can help your sales team close leads today.  Current customers talking about their previous issues, the other solutions they tried, why they chose you, and the results you helped them achieve is marketing gold.

On the other hand, even the best blog content will take months to gain enough traction to impact your revenue.

Still, many marketers who say they want to prioritize customer reviews focus all their efforts on blog content and other “top of the funnel” (Awareness, Acquisition, and Activation) efforts. 

The bottom half of the growth marketing funnel (Retention, Reputation, and Revenue) often gets ignored, even though it’s where you’ll find some of the highest ROI activities.

1716755163 123 Why The Sales Team Hates Your Leads And How To1716755163 123 Why The Sales Team Hates Your Leads And How To

Most marketers know retaining a customer is easier than acquiring a new one. But knowing this and working with sales on retention and account expansion are two different things. 

When you start focusing on retention, upselling, and expansion, your entire organization will feel it, from sales to customer success. These happier customers will increase your average account value and drive awareness through strong word of mouth, giving you one heck of a win/win.

Winning the Retention, Reputation, and Referral game also helps feed your Awareness, Acquisition, and Activation activities:

  • Increasing customer retention means more dollars stay within your organization to help achieve revenue goals and fund lead gen initiatives.
  • A fully functioning referral system lowers your customer acquisition cost (CAC) because these leads are already warm coming in the door.
  • Case studies and reviews are powerful marketing assets for lead gen and nurture activities as they demonstrate how you’ve solved identical issues for other companies.

Remember that the bottom half of your marketing and sales funnel is just as important as the top half. After all, there’s no point pouring leads into a leaky funnel. Instead, you want to build a frictionless, powerful growth engine that brings in the right leads, nurtures them into customers, and then delights those customers to the point that they can’t help but rave about you.

So, build a strong foundation and start from the bottom up. You’ll find a better return on your investment. 

Fix #2: Join Sales Calls to Better Understand Your Target Audience

You can’t market well what you don’t know how to sell.

Your sales team speaks directly to customers, understands their pain points, and knows the language they use to talk about those pains. Your marketing team needs this information to craft the perfect marketing messaging your target audience will identify with.

When marketers join sales calls or speak to existing customers, they get firsthand introductions to these pain points. Often, marketers realize that customers’ pain points and reservations are very different from those they address in their messaging. 

Once you understand your ideal customers’ objections, anxieties, and pressing questions, you can create content and messaging to remove some of these reservations before the sales call. This effort removes a barrier for your sales team, resulting in more SQLs.

Fix #3: Create Collateral That Closes Deals

One-pagers, landing pages, PDFs, decks — sales collateral could be anything that helps increase the chance of closing a deal. Let me share an example from Lean Labs. 

Our webinar page has a CTA form that allows visitors to talk to our team. Instead of a simple “get in touch” form, we created a drop-down segmentation based on the user’s challenge and need. This step helps the reader feel seen, gives them hope that they’ll receive real value from the interaction, and provides unique content to users based on their selection.

1716755163 298 Why The Sales Team Hates Your Leads And How To1716755163 298 Why The Sales Team Hates Your Leads And How To

So, if they select I need help with crushing it on HubSpot, they’ll get a landing page with HubSpot-specific content (including a video) and a meeting scheduler. 

Speaking directly to your audience’s needs and pain points through these steps dramatically increases the chances of them booking a call. Why? Because instead of trusting that a generic “expert” will be able to help them with their highly specific problem, they can see through our content and our form design that Lean Labs can solve their most pressing pain point. 

Fix #4: Focus On Reviews and Create an Impact Loop

A lot of people think good marketing is expensive. You know what’s even more expensive? Bad marketing

To get the best ROI on your marketing efforts, you need to create a marketing machine that pays for itself. When you create this machine, you need to think about two loops: the growth loop and the impact loop.

1716755163 789 Why The Sales Team Hates Your Leads And How To1716755163 789 Why The Sales Team Hates Your Leads And How To
  • Growth loop — Awareness ➡ Acquisition ➡ Activation ➡ Revenue ➡ Awareness: This is where most marketers start. 
  • Impact loop — Results ➡ Reviews ➡ Retention ➡ Referrals ➡ Results: This is where great marketers start. 

Most marketers start with their growth loop and then hope that traction feeds into their impact loop. However, the reality is that starting with your impact loop is going to be far more likely to set your marketing engine up for success

Let me share a client story to show you what this looks like in real life.

Client Story: 4X Website Leads In A Single Quarter

We partnered with a health tech startup looking to grow their website leads. One way to grow website leads is to boost organic traffic, of course, but any organic play is going to take time. If you’re playing the SEO game alone, quadrupling conversions can take up to a year or longer.

But we did it in a single quarter. Here’s how.

We realized that the startup’s demos were converting lower than industry standards. A little more digging showed us why: our client was new enough to the market that the average person didn’t trust them enough yet to want to invest in checking out a demo. So, what did we do?

We prioritized the last part of the funnel: reputation.

We ran a 5-star reputation campaign to collect reviews. Once we had the reviews we needed, we showcased them at critical parts of the website and then made sure those same reviews were posted and shown on other third-party review platforms. 

Remember that reputation plays are vital, and they’re one of the plays startups often neglect at best and ignore at worst. What others say about your business is ten times more important than what you say about yourself

By providing customer validation at critical points in the buyer journey, we were able to 4X the website leads in a single quarter!

1716755164 910 Why The Sales Team Hates Your Leads And How To1716755164 910 Why The Sales Team Hates Your Leads And How To

So, when you talk to customers, always look for opportunities to drive review/referral conversations and use them in marketing collateral throughout the buyer journey. 

Fix #5: Launch Phantom Offers for Higher Quality Leads 

You may be reading this post thinking, okay, my lead magnets and offers might be way off the mark, but how will I get the budget to create a new one that might not even work?

It’s an age-old issue: marketing teams invest way too much time and resources into creating lead magnets that fail to generate quality leads

One way to improve your chances of success, remain nimble, and stay aligned with your audience without breaking the bank is to create phantom offers, i.e., gauge the audience interest in your lead magnet before you create them.

For example, if you want to create a “World Security Report” for Chief Security Officers, don’t do all the research and complete the report as Step One. Instead, tease the offer to your audience before you spend time making it. Put an offer on your site asking visitors to join the waitlist for this report. Then wait and see how that phantom offer converts. 

This is precisely what we did for a report by Allied Universal that ended up generating 80 conversions before its release.

1716755164 348 Why The Sales Team Hates Your Leads And How To1716755164 348 Why The Sales Team Hates Your Leads And How To

The best thing about a phantom offer is that it’s a win/win scenario: 

  • Best case: You get conversions even before you create your lead magnet.
  • Worst case: You save resources by not creating a lead magnet no one wants.  

Remember, You’re On The Same Team 

We’ve talked a lot about the reasons your marketing leads might suck. However, remember that it’s not all on marketers, either. At the end of the day, marketing and sales professionals are on the same team. They are not in competition with each other. They are allies working together toward a common goal. 

Smaller companies — or anyone under $10M in net new revenue — shouldn’t even separate sales and marketing into different departments. These teams need to be so in sync with one another that your best bet is to align them into a single growth team, one cohesive front with a single goal: profitable customer acquisition.

Interested in learning more about the growth marketing mindset? Check out the Lean Labs Growth Playbook that’s helped 25+ B2B SaaS marketing teams plan, budget, and accelerate growth.


Disruptive Design Raising the Bar of Content Marketing with Graphic

Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

Trending