> ## Documentation Index
> Fetch the complete documentation index at: https://docs.migma.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Email Viewer & Code View

> Preview your generated emails, view code, and switch between display modes

## Overview

After Migma generates an email from your prompt, the email viewer lets you preview the result, inspect the code, and switch between display modes. Refine your email by sending follow-up prompts in the chat.

***

## Email Viewer Modes

<Tabs>
  <Tab title="Preview">
    See your email as subscribers will see it. Toggle between **desktop** and **mobile** layouts, and switch between **light** and **dark** mode to check how the design holds up.
  </Tab>

  <Tab title="HTML Code">
    View the generated HTML source with syntax highlighting and line numbers. Copy the code to your clipboard or download the file.
  </Tab>
</Tabs>

***

## Refining Your Email

Migma is conversational — edit your email by sending follow-up prompts in the chat:

* "Make the CTA button red"
* "Add a section about our new pricing"
* "Remove the footer image"
* "Make the headline shorter"

Each response generates an updated email version. Previous versions remain accessible in the conversation.

***

## Generation Options

Customize how your email is generated before prompting:

* **Design style** — Memphis, Brutalism, Neobrutalism, Y2K, Pop Art, Bauhaus, and more
* **Email DNA** — Match the style of platforms like Loops, Mailchimp, Beehiiv, ConvertKit, or Substack
* **Tone** — Professional, Casual, Urgent, Luxury, Playful, Humorous, and more
* **AI model** — Choose between different AI providers
* **Speed** — Toggle between quality and speed

***

## A/B Test Variants

When building a [campaign](/campaigns/overview) with A/B testing enabled:

1. Generate multiple email versions from different prompts
2. In the campaign wizard, assign each version to a variant (A, B, C, etc.)
3. Set the test audience size
4. The winning variant is sent to the remaining audience

Variants are selected from your generated emails — each variant uses a separate email conversation.

***

## Subject & Preheader Override

In the campaign wizard, you can override the AI-generated subject line and preheader text:

* **Subject line** — up to 80 characters
* **Preheader** — preview text shown in inbox list views

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Create an Email" icon="wand-magic-sparkles" href="/creating-emails/prompt-based-creation">
    Generate emails from prompts
  </Card>

  <Card title="Export Options" icon="download" href="/email-editor/export-options">
    Export to HTML, MJML, and ESPs
  </Card>

  <Card title="Email Preflight" icon="check-double" href="/email-editor/email-preflight">
    Test before sending
  </Card>

  <Card title="Send a Campaign" icon="paper-plane" href="/campaigns/send-campaign">
    Send your email to your audience
  </Card>
</CardGroup>
