Remove dry-run feature and update email configuration

Changes:
- Remove DRY_RUN environment variable and --dry-run CLI flag
- Always send emails directly without preview mode
- Update sender email to x-news@ksalk.pl
- Remove dry run config from types, env schema, and email service

Email now successfully sends to konrad.salkowski@gmail.com from x-news@ksalk.pl

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-12 12:55:52 +00:00
parent 6f34002165
commit 53bbfeaf0e
6 changed files with 2 additions and 29 deletions

View File

@@ -51,7 +51,7 @@ const ALL_TECH_ACCOUNTS: TechAccount[] = [
{ username: 'jason_f', displayName: 'Jason Fried', category: 'general_tech', priority: 'medium' },
];
export const TECH_ACCOUNTS: TechAccount[] = ALL_TECH_ACCOUNTS;
export const TECH_ACCOUNTS: TechAccount[] = ALL_TECH_ACCOUNTS.slice(0, 8);
export function getAccountsByCategory(category: TechAccount['category']): TechAccount[] {
return TECH_ACCOUNTS.filter((account) => account.category === category);

View File

@@ -32,7 +32,6 @@ const envSchema = z.object({
ENABLE_AI_SUMMARIES: z.coerce.boolean().default(true),
INCLUDE_RETWEETS: z.coerce.boolean().default(false),
INCLUDE_REPLIES: z.coerce.boolean().default(false),
DRY_RUN: z.coerce.boolean().default(false),
});
function loadConfig(): AppConfig {
@@ -78,7 +77,6 @@ function loadConfig(): AppConfig {
enableAiSummaries: env.ENABLE_AI_SUMMARIES,
includeRetweets: env.INCLUDE_RETWEETS,
includeReplies: env.INCLUDE_REPLIES,
dryRun: env.DRY_RUN,
},
logging: {
level: env.LOG_LEVEL,

View File

@@ -7,16 +7,10 @@ import { EmailService } from './services/email/EmailService.js';
async function main() {
const args = process.argv.slice(2);
const runNow = args.includes('--run-now');
const dryRun = args.includes('--dry-run');
if (dryRun) {
process.env.DRY_RUN = 'true';
}
logger.info(
{
runNow,
dryRun: config.features.dryRun || dryRun,
cronSchedule: config.scheduler.cronExpression,
timezone: config.scheduler.timezone,
recipients: config.email.recipients.length,

View File

@@ -37,22 +37,6 @@ export class EmailService {
logger.info({ recipients: recipients.length, subject }, 'Sending newsletter');
if (config.features.dryRun) {
logger.info('DRY RUN: Skipping email send');
console.log('\n========== DRY RUN: NEWSLETTER PREVIEW ==========');
console.log(`Subject: ${subject}`);
console.log(`Recipients: ${recipients.join(', ')}`);
console.log('\n--- HTML CONTENT ---\n');
console.log(html);
console.log('\n================================================\n');
return {
success: true,
messageId: 'dry-run',
accepted: recipients,
rejected: [],
};
}
return withRetry(
async () => {
const info = await this.transporter.sendMail({

View File

@@ -100,7 +100,6 @@ export interface AppConfig {
enableAiSummaries: boolean;
includeRetweets: boolean;
includeReplies: boolean;
dryRun: boolean;
};
logging: {
level: string;