Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

24
LINES

< > BotCompany Repo | #1030650 // Mail Sender Web Bot

JavaX source code (desktop) [tags: butter use-pretranspiled] - run with: x30.jar - homepage

Download Jar. Uses 715K of libraries. Click here for Pure Java version (3313L/20K).

!7

p {
  createPWFile(passwordFile());
}

static File passwordFile() {
  ret javaxSecretDir("mail-sender-bot-pw");
}

html {
  S realPW = assertNempty(loadTextFileTrim(passwordFile()));
  S pw = params.get("pw");
  if (!eq(pw, realPW)) ret "Bad PW";
  
  S from = params.get("from");
  S to = params.get("to");
  S subject = params.get("subject");
  S text = params.get("text");
  
  javaMail_sendThroughLocalhost(from, to, subject, text);

  ret "OK, mail sent";
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030650
Snippet name: Mail Sender Web Bot
Eternal ID of this version: #1030650/3
Text MD5: a361535f832523498f0b1b58bf7d3f5a
Transpilation MD5: e24f57f54f7946ec63dd2ea30f388eaa
Author: stefan
Category: javax / web chat bots
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-02-19 15:38:51
Source code size: 489 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 256 / 1073
Version history: 2 change(s)
Referenced in: [show references]