[{"data":1,"prerenderedAt":479},["ShallowReactive",2],{"navigation_docs":3,"-connectors-email":139,"-connectors-email-surround":474},[4,8,12,16,20,24,28,32,59,63,117,121,135],{"title":5,"path":6,"stem":7},"Introduction","\u002Fintroduction","1.introduction",{"title":9,"path":10,"stem":11},"Memory","\u002Fmemory","10.memory",{"title":13,"path":14,"stem":15},"Customization","\u002Fcustomization","11.customization",{"title":17,"path":18,"stem":19},"Deployment","\u002Fdeployment","12.deployment",{"title":21,"path":22,"stem":23},"Reference","\u002Freference","13.reference",{"title":25,"path":26,"stem":27},"Quickstart","\u002Fquickstart","2.quickstart",{"title":29,"path":30,"stem":31},"Installation","\u002Finstallation","3.installation",{"title":33,"icon":34,"path":35,"stem":36,"children":37,"page":58},"Connectors","i-lucide-cable","\u002Fconnectors","4.connectors",[38,42,46,50,54],{"title":39,"path":40,"stem":41},"Telegram","\u002Fconnectors\u002Ftelegram","4.connectors\u002F1.telegram",{"title":43,"path":44,"stem":45},"Slack","\u002Fconnectors\u002Fslack","4.connectors\u002F2.slack",{"title":47,"path":48,"stem":49},"Email","\u002Fconnectors\u002Femail","4.connectors\u002F3.email",{"title":51,"path":52,"stem":53},"API","\u002Fconnectors\u002Fapi","4.connectors\u002F4.api",{"title":55,"path":56,"stem":57},"Terminal","\u002Fconnectors\u002Fterminal","4.connectors\u002F5.terminal",false,{"title":60,"path":61,"stem":62},"Attachments","\u002Fattachments","5.attachments",{"title":64,"icon":65,"path":66,"stem":67,"children":68,"page":58},"Tools","i-lucide-wrench","\u002Ftools","6.tools",[69,73,77,81,85,89,93,97,101,105,109,113],{"title":70,"path":71,"stem":72},"File Manager","\u002Ftools\u002Ffile-manager","6.tools\u002F1.file-manager",{"title":74,"path":75,"stem":76},"Text-to-Speech","\u002Ftools\u002Ftext-to-speech","6.tools\u002F10.text-to-speech",{"title":78,"path":79,"stem":80},"Confirmations","\u002Ftools\u002Fconfirmations","6.tools\u002F11.confirmations",{"title":82,"path":83,"stem":84},"Adding Custom Tools","\u002Ftools\u002Fadding-custom-tools","6.tools\u002F12.adding-custom-tools",{"title":86,"path":87,"stem":88},"Image Manager","\u002Ftools\u002Fimage-manager","6.tools\u002F2.image-manager",{"title":90,"path":91,"stem":92},"Web Request","\u002Ftools\u002Fweb-request","6.tools\u002F3.web-request",{"title":94,"path":95,"stem":96},"Reminders","\u002Ftools\u002Freminders","6.tools\u002F4.reminders",{"title":98,"path":99,"stem":100},"Heartbeats","\u002Ftools\u002Fheartbeats","6.tools\u002F5.heartbeats",{"title":102,"path":103,"stem":104},"Email Manager","\u002Ftools\u002Femail-manager","6.tools\u002F6.email-manager",{"title":106,"path":107,"stem":108},"Calendar","\u002Ftools\u002Fcalendar","6.tools\u002F7.calendar",{"title":110,"path":111,"stem":112},"Read Database","\u002Ftools\u002Fread-database","6.tools\u002F8.read-database",{"title":114,"path":115,"stem":116},"Headless Browser","\u002Ftools\u002Fbrowser","6.tools\u002F9.browser",{"title":118,"path":119,"stem":120},"Tinker","\u002Ftinker","7.tinker",{"title":122,"icon":123,"path":124,"stem":125,"children":126,"page":58},"Skills","i-lucide-sparkles","\u002Fskills","8.skills",[127,131],{"title":128,"path":129,"stem":130},"Overview","\u002Fskills\u002Foverview","8.skills\u002F1.overview",{"title":132,"path":133,"stem":134},"Adding Custom Skills","\u002Fskills\u002Fadding-custom-skills","8.skills\u002F2.adding-custom-skills",{"title":136,"path":137,"stem":138},"Personas","\u002Fpersonas","9.personas",{"id":140,"title":47,"body":141,"description":468,"extension":469,"links":470,"meta":471,"navigation":218,"path":48,"seo":472,"stem":49,"__hash__":473},"docs\u002F4.connectors\u002F3.email.md",{"type":142,"value":143,"toc":459},"minimark",[144,148,163,167,170,198,201,297,301,308,311,342,346,359,366,375,392,396,411,415,422,442,445,448,455],[145,146,5],"h2",{"id":147},"introduction",[149,150,151,152,162],"p",{},"The Email connector reads inbound mail from an IMAP mailbox and sends replies via SMTP. It uses its own credentials, separate from your Laravel app's mail configuration, so it doesn't interfere with anything else. It's powered by ",[153,154,158],"a",{"href":155,"rel":156},"https:\u002F\u002Fgithub.com\u002Fdirectorytree\u002Fimapengine-laravel",[157],"nofollow",[159,160,161],"code",{},"directorytree\u002Fimapengine-laravel",".",[145,164,166],{"id":165},"setup","Setup",[149,168,169],{},"Run the connector wizard:",[171,172,177],"pre",{"className":173,"code":174,"language":175,"meta":176,"style":176},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","php artisan laraclaw:setup-connector email\n","bash","",[159,178,179],{"__ignoreMap":176},[180,181,184,188,192,195],"span",{"class":182,"line":183},"line",1,[180,185,187],{"class":186},"sBMFI","php",[180,189,191],{"class":190},"sfazB"," artisan",[180,193,194],{"class":190}," laraclaw:setup-connector",[180,196,197],{"class":190}," email\n",[149,199,200],{},"It asks for IMAP and SMTP credentials and writes:",[171,202,206],{"className":203,"code":204,"language":205,"meta":176,"style":176},"language-env shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","LARACLAW_EMAIL_ENABLED=true\n\nLARACLAW_IMAP_HOST=imap.gmail.com\nLARACLAW_IMAP_PORT=993\nLARACLAW_IMAP_ENCRYPTION=ssl\nLARACLAW_IMAP_USERNAME=you@example.com\nLARACLAW_IMAP_PASSWORD=...\n\nLARACLAW_SMTP_HOST=smtp.gmail.com\nLARACLAW_SMTP_PORT=587\nLARACLAW_SMTP_ENCRYPTION=tls\nLARACLAW_SMTP_USERNAME=you@example.com\nLARACLAW_SMTP_PASSWORD=...\nLARACLAW_SMTP_FROM_ADDRESS=you@example.com\nLARACLAW_SMTP_FROM_NAME=Laraclaw\n","env",[159,207,208,213,220,226,232,238,244,250,255,261,267,273,279,285,291],{"__ignoreMap":176},[180,209,210],{"class":182,"line":183},[180,211,212],{},"LARACLAW_EMAIL_ENABLED=true\n",[180,214,216],{"class":182,"line":215},2,[180,217,219],{"emptyLinePlaceholder":218},true,"\n",[180,221,223],{"class":182,"line":222},3,[180,224,225],{},"LARACLAW_IMAP_HOST=imap.gmail.com\n",[180,227,229],{"class":182,"line":228},4,[180,230,231],{},"LARACLAW_IMAP_PORT=993\n",[180,233,235],{"class":182,"line":234},5,[180,236,237],{},"LARACLAW_IMAP_ENCRYPTION=ssl\n",[180,239,241],{"class":182,"line":240},6,[180,242,243],{},"LARACLAW_IMAP_USERNAME=you@example.com\n",[180,245,247],{"class":182,"line":246},7,[180,248,249],{},"LARACLAW_IMAP_PASSWORD=...\n",[180,251,253],{"class":182,"line":252},8,[180,254,219],{"emptyLinePlaceholder":218},[180,256,258],{"class":182,"line":257},9,[180,259,260],{},"LARACLAW_SMTP_HOST=smtp.gmail.com\n",[180,262,264],{"class":182,"line":263},10,[180,265,266],{},"LARACLAW_SMTP_PORT=587\n",[180,268,270],{"class":182,"line":269},11,[180,271,272],{},"LARACLAW_SMTP_ENCRYPTION=tls\n",[180,274,276],{"class":182,"line":275},12,[180,277,278],{},"LARACLAW_SMTP_USERNAME=you@example.com\n",[180,280,282],{"class":182,"line":281},13,[180,283,284],{},"LARACLAW_SMTP_PASSWORD=...\n",[180,286,288],{"class":182,"line":287},14,[180,289,290],{},"LARACLAW_SMTP_FROM_ADDRESS=you@example.com\n",[180,292,294],{"class":182,"line":293},15,[180,295,296],{},"LARACLAW_SMTP_FROM_NAME=Laraclaw\n",[145,298,300],{"id":299},"trusted-senders","Trusted Senders",[149,302,303,304,307],{},"The wizard also asks which email addresses the bot should reply to, defaulting to the owner's email. Each address becomes a ",[159,305,306],{},"laraclaw_accounts"," row mapping that email to the owner. Mail from any other sender is dropped during validation.",[149,309,310],{},"To add another trusted sender later, re-run the wizard, or insert directly:",[171,312,315],{"className":313,"code":314,"language":187,"meta":176,"style":176},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Account::create([\n    'user_id' => $ownerUserId,\n    'connector' => 'email',\n    'account' => 'other@example.com',\n]);\n",[159,316,317,322,327,332,337],{"__ignoreMap":176},[180,318,319],{"class":182,"line":183},[180,320,321],{},"Account::create([\n",[180,323,324],{"class":182,"line":215},[180,325,326],{},"    'user_id' => $ownerUserId,\n",[180,328,329],{"class":182,"line":222},[180,330,331],{},"    'connector' => 'email',\n",[180,333,334],{"class":182,"line":228},[180,335,336],{},"    'account' => 'other@example.com',\n",[180,338,339],{"class":182,"line":234},[180,340,341],{},"]);\n",[145,343,345],{"id":344},"dkim-and-spf","DKIM and SPF",[149,347,348,349,352,353,355,356,358],{},"The Email connector has no webhook to verify — it polls IMAP. The trust boundary is the sender's ",[159,350,351],{},"From:"," header, and the only protection against forging it is DKIM and SPF. By default, every incoming message must pass at least one of them, even if the ",[159,354,351],{}," address is in ",[159,357,306],{},". Failures are logged and the message is dropped.",[149,360,361,362,365],{},"You may disable this in ",[159,363,364],{},".env",":",[171,367,369],{"className":203,"code":368,"language":205,"meta":176,"style":176},"LARACLAW_EMAIL_VERIFY_SENDER_DKIM_AND_SPF=false\n",[159,370,371],{"__ignoreMap":176},[180,372,373],{"class":182,"line":183},[180,374,368],{},[376,377,378],"blockquote",{},[149,379,380,383,384,388,389,391],{},[180,381,382],{},"!WARNING","\nDisabling DKIM and SPF verification makes it possible for someone to spoof a trusted sender. Only do this if you control the inbound mail server and trust its filtering. Laraclaw does ",[385,386,387],"strong",{},"not"," check DMARC alignment, so a message that passes DKIM\u002FSPF for a different domain than the ",[159,390,351],{}," header will still be accepted.",[145,393,395],{"id":394},"threading","Threading",[149,397,398,399,402,403,406,407,410],{},"Conversations are keyed per sender address. Every message from the same trusted address lands in the same Thread, regardless of subject line. Replies set the ",[159,400,401],{},"In-Reply-To"," and ",[159,404,405],{},"References"," headers so most email clients render the exchange as a single conversation, and the reply subject is prefixed with ",[159,408,409],{},"Re:"," if it isn't already.",[145,412,414],{"id":413},"running-the-imap-listener","Running the IMAP Listener",[149,416,417,418,421],{},"Inbound mail is delivered by ",[159,419,420],{},"imap:watch",", a long-running command from imapengine that polls the inbox and dispatches events:",[171,423,425],{"className":173,"code":424,"language":175,"meta":176,"style":176},"php artisan imap:watch default --with=headers,body\n",[159,426,427],{"__ignoreMap":176},[180,428,429,431,433,436,439],{"class":182,"line":183},[180,430,187],{"class":186},[180,432,191],{"class":190},[180,434,435],{"class":190}," imap:watch",[180,437,438],{"class":190}," default",[180,440,441],{"class":190}," --with=headers,body\n",[149,443,444],{},"In production, run it under a process supervisor so it restarts on failure.",[145,446,60],{"id":447},"attachments",[149,449,450,451,454],{},"Inbound attachments are saved under ",[159,452,453],{},"inbound\u002F{message_uuid}\u002F"," on the attachments disk. Outbound attachments produced by tools are attached to the SMTP message before sending.",[456,457,458],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":176,"searchDepth":215,"depth":215,"links":460},[461,462,463,464,465,466,467],{"id":147,"depth":215,"text":5},{"id":165,"depth":215,"text":166},{"id":299,"depth":215,"text":300},{"id":344,"depth":215,"text":345},{"id":394,"depth":215,"text":395},{"id":413,"depth":215,"text":414},{"id":447,"depth":215,"text":60},"Let Laraclaw read incoming email via IMAP and reply via SMTP.","md",null,{},{"title":47,"description":468},"HJd1i9Fdj5nc8hIZMgRn6rYg4FaYpOYmXTtmDdbot8k",[475,477],{"title":43,"path":44,"stem":45,"description":476,"children":-1},"Connect Laraclaw to a Slack workspace for DMs and threaded channel conversations.",{"title":51,"path":52,"stem":53,"description":478,"children":-1},"Talk to Laraclaw over HTTP using a hashed Bearer token.",1786661906119]