@@ -413,53 +413,15 @@ async function sendViaGmailApi(
413413export async function sendCodingCatEmailDetailed (
414414 opts : CodingCatEmailOptions ,
415415) : Promise < CodingCatEmailResult > {
416- const from = opts . from ?? "alex@codingcat.dev" ;
417- const fromName = opts . fromName ?? "Alex Patterson (CodingCat.dev)" ;
418416 const rfc822MessageId =
419417 opts . messageId || `<${ crypto . randomUUID ( ) } @codingcat.dev>` ;
420- const raw = buildMimeMessage ( {
421- from,
422- fromName,
423- to : opts . to ,
424- cc : opts . cc ,
425- replyTo : opts . replyTo ,
418+ // Automated email sending is intentionally disabled; all emails and drafts
419+ // are managed directly by Alex in Antigravity chat.
420+ return {
421+ ok : false ,
422+ rfc822MessageId,
426423 subject : opts . subject ,
427- text : opts . text ,
428- html : opts . html ,
429- inReplyTo : opts . inReplyTo ,
430- references : opts . references || opts . inReplyTo ,
431- messageId : rfc822MessageId ,
432- } ) ;
433-
434- // 1. Primary: Send via Gmail API (delivers to any external guest or sponsor email address)
435- const gmailRes = await sendViaGmailApi ( raw , opts . threadId ) ;
436- if ( gmailRes . ok ) {
437- return {
438- ok : true ,
439- id : gmailRes . id ,
440- threadId : gmailRes . threadId ,
441- rfc822MessageId,
442- subject : opts . subject ,
443- } ;
444- }
445-
446- // 2. Fallback: Cloudflare Email Routing send_email binding
447- try {
448- const workerEnv = ( env ?? { } ) as unknown as {
449- EMAIL ?: SendEmailBinding ;
450- } ;
451- if ( ! workerEnv . EMAIL ) {
452- return { ok : false , rfc822MessageId, subject : opts . subject } ;
453- }
454-
455- const primaryTo = Array . isArray ( opts . to ) ? opts . to [ 0 ] : opts . to ;
456- const { EmailMessage } = await import ( "cloudflare:email" ) ;
457- const msg = new EmailMessage ( from , primaryTo , raw ) ;
458- await workerEnv . EMAIL . send ( msg ) ;
459- return { ok : true , rfc822MessageId, subject : opts . subject } ;
460- } catch {
461- return { ok : false , rfc822MessageId, subject : opts . subject } ;
462- }
424+ } ;
463425}
464426
465427export async function sendCodingCatEmail (
0 commit comments