agenticmail 0.3.20 → 0.3.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +14 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -4333,10 +4333,19 @@ async function cmdSetup() {
4333
4333
  return;
4334
4334
  }
4335
4335
  log2("");
4336
+ let emailOk = false;
4336
4337
  if (choice === "1") {
4337
- await setupRelay(result.config);
4338
+ emailOk = await setupRelay(result.config);
4338
4339
  } else {
4339
4340
  await setupDomain(result.config);
4341
+ emailOk = true;
4342
+ }
4343
+ if (!emailOk) {
4344
+ log2("");
4345
+ info2("Email setup did not complete. Run " + c2.green("npx agenticmail setup") + " again to retry.");
4346
+ cleanupChild();
4347
+ printSummary(result, true);
4348
+ return;
4340
4349
  }
4341
4350
  } else if (!existingEmail) {
4342
4351
  info2("No problem! You can set up email anytime by running this again.");
@@ -4539,7 +4548,7 @@ async function setupRelay(config) {
4539
4548
  log2("");
4540
4549
  info2("Double-check your email and app password, then run: agenticmail setup");
4541
4550
  }
4542
- return;
4551
+ return false;
4543
4552
  }
4544
4553
  const data = await response.json();
4545
4554
  spinner.succeed("Email connected!");
@@ -4552,12 +4561,13 @@ async function setupRelay(config) {
4552
4561
  info2("People can email your agent at the address above.");
4553
4562
  await sendWelcomeEmail(apiBase, data.agent.apiKey, email, data.agent.name, data.agent.subAddress);
4554
4563
  }
4555
- return;
4564
+ return true;
4556
4565
  } catch (err) {
4557
4566
  spinner.fail(`Couldn't connect: ${err.message}`);
4558
- return;
4567
+ return false;
4559
4568
  }
4560
4569
  }
4570
+ return false;
4561
4571
  }
4562
4572
  function parseFriendlyError(rawText) {
4563
4573
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenticmail",
3
- "version": "0.3.20",
3
+ "version": "0.3.21",
4
4
  "description": "Email infrastructure for AI agents — send and receive real email programmatically",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",