🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 26, 2026

How to Send a Postcard or Letter From Gravity Forms

GravityExtra
How to Send a Postcard or Letter From Gravity Forms

A thank-you e-mail lands in a crowded inbox and is gone in a day. A postcard sits on a desk for a week, and a letter is opened and kept. When someone fills in a form on your WordPress site, that is the moment they are thinking about you, and it is the perfect moment to put something real in the post. This tutorial shows how to print and post a postcard or letter straight from Gravity Forms, through your own print-and-mail account, with the address taken from the form and the whole thing sent in the background so the visitor never waits. It uses the Gravity Forms Direct Mail Premium Add-on; the full setup guide has every setting in detail.

Why send direct mail from a form

Physical mail cuts through in a way that another e-mail cannot. A welcome postcard to a new member, a printed letter confirming an order, a voucher to someone who asked for a quote, a change-of-address card to a customer who just moved: these all start with a form, and they all land better on paper. The trouble has always been the gap between the form and the printer. Exporting a spreadsheet, uploading it to a mailing house and waiting is slow and easy to forget. Doing it automatically, one piece per submission, closes that gap.

Three services make on-demand mail possible through an API: Lob and PostGrid are international print-and-mail platforms, and Stannp covers the UK, Europe and the United States. You create an account, add credit and generate an API key, and the service prints and posts each mailpiece for you. The Gravity Forms Direct Mail Premium Add-on connects your forms to whichever of the three you use, so a submission becomes a postcard or a letter without anyone touching a spreadsheet.

What you need

  • An account with Lob, PostGrid or Stannp, and an API key from its dashboard. Lob and PostGrid give you a test key and a live key; Stannp has a test mode.
  • Gravity Forms 2.5 or newer and the Gravity Forms Direct Mail Premium Add-on.
  • A form that collects a postal address, or fixed values you type into the feed.
  • A design: either a template you save in the provider dashboard, or simple HTML with merge tags for a plain postcard or letter.

Step 1: connect your provider once

Install the add-on and open Forms → Settings → Direct Mail. Activate your licence, choose your default provider, and paste the API key of each provider you plan to use. Leave the send mode on Test while you set everything up. Fill in the return address, which is printed as the sender and is required for letters with Lob and PostGrid, then press Check the connection to confirm the key works. Each key is encrypted before it is saved, with a key made from your site’s own security salts, and it is never shown again.

The Direct Mail settings screen in Gravity Forms: the licence box, the default provider, the send mode, the encrypted Lob, PostGrid and Stannp API keys, the return address, the daily cap and the Check the connection button
The settings: the default provider, your encrypted API keys and the return address.

The add-on only ever sends a key to the host of its own provider, so a Lob key goes only to Lob, a PostGrid key only to PostGrid and a Stannp key only to Stannp. Nothing passes through GravityExtra, and you keep your own account, your own prices and your own logs.

Step 2: build the mailpiece

Open the form you want to post from, go to Settings → Direct Mail and add a feed. Give it a clear name, such as Welcome postcard, pick the provider for this feed (or leave it on the default) and choose a postcard or a letter. Then map the recipient address from the form: the name, the first address line, the city, the postcode and the country are required, while the company, a second address line and the state or region are optional. Use the merge tag button to pull each value from a form field, or type a fixed value such as the country.

A Direct Mail feed: the provider, the mailpiece type, the recipient address mapped from the form, the content with merge tags, the more options table and the condition
A feed: the provider, the mailpiece, the recipient address and the content.

For the content you have two choices. The simplest is to paste HTML with merge tags straight into the Front field, for example a short greeting that includes the person’s name and their plan. The richer choice is to design a template in the provider dashboard, where you control the layout, the images and the fonts, and then paste its template id into the feed. Variables in the template are filled from the merge variables option, so one design serves every entry. Because the add-on posts whatever the template renders, you can mail a generated PDF this way without the add-on having to create the PDF itself.

Step 3: decide when it goes out

Not every entry should get mail. Turn on the condition and set a rule, for example send only when the chosen plan is Premium, or only when the country is one you post to. You can add several feeds to one form, each with its own provider, mailpiece and condition, so a premium signup gets a letter while a basic one gets a postcard, or a UK address goes to Stannp while an international one goes to Lob. Only the feeds whose conditions match an entry are posted.

Step 4: send a test and go live

Keep the send mode on Test and submit a test entry. The add-on creates the mailpiece in the background and writes the result on the entry. Open the entry and look at the Direct Mail box: it shows the recipient, the mailpiece type, the provider piece id and the expected delivery date. With Lob and PostGrid a test key produces a preview you can open; with Stannp a sample is made. When the mailpiece looks right, switch the send mode to Live and the next matching submission is printed and posted for real.

The Direct Mail box on a Gravity Forms entry: the recipient, the mailpiece type, the provider piece id and the expected delivery date
The entry: the recipient, the mailpiece, the provider piece id and the expected delivery date.

Which provider should you choose?

All three providers do the same core job, and the add-on treats them the same way, so you can start with one and add another later without rebuilding your feeds. Lob is a strong fit if you post mainly within the United States and want a mature template editor and address verification. PostGrid is a good international choice with a clean print-and-mail API and per-country support. Stannp is often the most convenient option for the UK and Europe, with simple pricing and a built-in template gallery. Because each feed picks its own provider, you can even route mail by country: a US address to one service and the rest to another, all from the same form.

Why it never mails twice

Posting the same letter twice wastes money and annoys the recipient, so the add-on guards against it carefully. Every send carries a unique idempotency key made from the site, the entry and the feed. Lob and PostGrid receive it as an Idempotency-Key header and refuse a repeat with the same key, and the add-on records the key for every provider. If the provider cannot be reached, the add-on retries after one minute, five minutes, half an hour, two hours and twelve hours, always with the same key, then gives up with a note. If a request times out or the provider gives an answer the add-on cannot read, the mailpiece may already have been created, so the add-on stops and marks the entry unsure rather than risk a second piece; the note gives the key to look up in the provider logs.

Because the work happens in a background job, the person filling in the form never waits for the provider and never sees an error if the provider is slow. They get the normal confirmation at once, and the mailpiece follows a moment later.

Keeping control of mail and spend

  • Set a daily cap in the settings so a wave of spam submissions cannot post hundreds of mailpieces and empty your account.
  • Use the condition so you post only to the entries that should get mail, not every submission.
  • With a payment add-on, the delayed-feed option posts only after payment is completed, so order mail goes out for paid orders only.
  • Watch the notes and the two notification events, so you know at once if a provider rejects an address.

Questions

Do I need a developer to set it up?

No. Everything is in two screens: the add-on settings for your provider account and the feed settings of each form. Developers can use a filter to change the address, the content or the options before a mailpiece is created.

Are my API keys safe?

Each key is encrypted with a key made from your site’s security salts, never shown again, and only ever sent to its own provider. Notes and logs never contain it, and notes keep only the recipient town, postcode and country.

Who pays for the mail?

You do, to your provider, at your own price. The add-on never sends anything through GravityExtra, and you keep your account, your templates and your logs.

Does it make the PDF for me?

No. This add-on handles the physical mailing. If you already have a generated PDF or a design, save it as a provider template and point the feed at its template id, and the add-on posts it.

Which Gravity Forms versions does it support?

Gravity Forms 2.5 and newer. It is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.

Get started

The Gravity Forms Direct Mail Premium Add-on prints and posts a postcard or letter through your own Lob, PostGrid or Stannp account for every matching submission, with the address and content mapped from the form, conditional logic, safe retries that never mail twice, and the tracking id on the entry. See the features, the price and the setup guide on the add-on page.

See the Direct Mail add-on

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr