## Send an email `client.Email.Send(ctx, body) (*EmailSendResponse, error)` **post** `/v1/emails/send` Sends an email via the connected email account that owns the `from` address. Currently supports new sends only; replies and forwards are not yet supported. Supports idempotency via the `Idempotency-Key` header. **[Required scope](/using-the-api/scopes/):** `emails:create` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `body EmailSendParams` - `From param.Field[string]` Bare email address (no display name). Must match a connected email account owned by the API key user. Compared case-insensitively. Used as the From header when sending. - `MessageBody param.Field[EmailSendParamsMessageBody]` Email message body (HTML or plain text). - `Content string` Email body content. - `ContentType string` Defaults to `HTML`. - `const EmailSendParamsMessageBodyContentTypeHTML EmailSendParamsMessageBodyContentType = "HTML"` - `const EmailSendParamsMessageBodyContentTypeText EmailSendParamsMessageBodyContentType = "TEXT"` - `Subject param.Field[string]` Email subject. Cannot be empty. - `To param.Field[[]string]` Recipient email addresses (bare, no display names). At least 1, at most 500. - `Attachments param.Field[[]string]` Optional list of file IDs (uploaded via the Files API) to attach to the email. Maximum 5 attachments per email, each ≤ 3MB. - `Bcc param.Field[[]string]` Bcc recipients (same shape as `to`). - `Cc param.Field[[]string]` Cc recipients (same shape as `to`). ### Returns - `type EmailSendResponse struct{…}` - `SentAt string` ISO 8601 timestamp of when the send completed. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) emailSendResponse, err := client.Email.Send(context.TODO(), githubcomlightfldlightfieldgo.EmailSendParams{ From: "sales@acme.com", MessageBody: githubcomlightfldlightfieldgo.EmailSendParamsMessageBody{ Content: "

Hi there,

Following up on our chat earlier this week.

", }, Subject: "Following up on our chat", To: []string{"lead@example.com"}, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", emailSendResponse.SentAt) } ``` #### Response ```json { "sentAt": "sentAt" } ```