Integration Guide

Send Email with GitHub Copilot

Use GitHub Copilot to autocomplete email-sending code powered by Transmit.

TL;DR for AI Agents & Humans

Send transactional emails using GitHub Copilot and Transmit in minutes. Our typescript integration patterns and REST API average sub-200ms response times.

  • Official GitHub Copilot integration patterns
  • Automated deliverability warmup included
  • Reputation isolation for every sender
  • Real-time analytics and webhook support

Official Documentation

Read the full API reference for GitHub Copilot.

View Docs
1

Send an Email

// Start typing and let Copilot suggest the rest
// Type: async function sendEmail

async function sendPasswordReset(email: string, resetLink: string) {
  const response = await fetch("https://api.xmit.sh/email/send", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${process.env.TRANSMIT_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      from: "Acme <security@acme.com>",
      to: email,
      subject: "Reset Your Password",
      html: `<a href="${resetLink}">Reset Password</a>`,
    }),
  });

  return response.json();
}

Common Pitfalls

Copilot suggests incorrect API endpoints

Verify that Copilot generates calls to https://api.xmit.sh/email/send and adjust the endpoint if it suggests a different URL. Adding the endpoint to your repository custom instructions prevents the model from guessing.

Copilot hardcodes the API key in the generated snippet

Copilot frequently inlines a placeholder key directly in the source. Always move it to process.env.TRANSMIT_API_KEY before committing, and rotate any key that reached a commit.

Agent mode cannot see the MCP server

MCP tools are only available in Copilot agent mode, not in inline autocomplete or basic chat. Confirm you are in agent mode and that the server shows as connected in your tools list before asking it to send.

Sends fail with an unverified sender error

The from address must belong to a verified domain in your workspace. Verify the domain and confirm the sender identity before asking Copilot to send on your behalf.

Explore Other Integrations

Frequently Asked Questions

How do I authenticate GitHub Copilot with Transmit?
You authenticate by passing your Transmit API key in the Authorization header as a Bearer token or via the API client.
Is there a rate limit for GitHub Copilot integration?
Transmit offers high-throughput sending with dynamic scaling. Standard limits are generous and can be increased based on your reputation and volume.