Descripción
Write to Your MP adds a postcode box to any page. A visitor enters their postcode, sees their MP’s name, constituency, party, and email, and gets a campaign letter they can edit before sending. Clicking the button opens the letter in their own email client via mailto: — the email is sent by the visitor, not your site, so you carry no responsibility for moderating outgoing mail.
Features:
- Postcode to MP lookup with no API key required.
- Multiple campaigns, each a separate entry with its own shortcode
[wtym_write_to_mp slug="your-campaign"]. - Editable letter templates with placeholders for MP details and supporter-entered fields.
- Configurable visitor fields (first name, last name, postal address) per campaign, with optional required validation.
- Friendly handling of invalid postcodes, vacant seats, and MPs with no public email.
- Self-contained, responsive styling that inherits your theme fonts.
Placeholders:
- From the MP lookup:
{mp_name},{constituency},{party}. - From the supporter (the fields you enable):
{first_name},{last_name},{address}.
External services
This plugin looks up MP details from two public services, called server-side only when a visitor submits a postcode:
- postcodes.io (https://postcodes.io) — converts a postcode to a constituency. Privacy: https://postcodes.io/about
- UK Parliament Members API (https://members-api.parliament.uk) — returns the MP’s name, party, and contact email. Terms: https://www.parliament.uk
No personal data is stored by this plugin; the letter is sent from the visitor’s own email client.
Capturas




Instalación
- Upload the plugin and activate it.
- Go to Write to Your MP and add a campaign. Set the intro, subject, letter body, and supporter fields.
- Publish the campaign and copy its shortcode.
- Paste the shortcode into a page (in Elementor use the Shortcode widget, not the HTML widget).
FAQ
-
Does this send email from my server?
-
No. It builds a
mailto:link that opens the visitor’s own email client with the recipient, subject, and body filled in. The visitor reviews and sends it themselves. -
Do I need an API key?
-
No. Both upstream services are free and require no key.
Reseñas
No hay valoraciones para este plugin.
Colaboradores y desarrolladores
«Japeto Labs – Write to Your MP» es un software de código abierto. Las siguientes personas han colaborado con este plugin.
ColaboradoresTraduce «Japeto Labs – Write to Your MP» a tu idioma.
¿Interesado en el desarrollo?
Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.
Registro de cambios
1.0.0
- First public release: multiple campaigns via a custom post type, configurable supporter fields, split placeholder reference, theme-inherited styling, and a modular codebase.
