sendmail.exe 唔知點用 入左INI唔WORK
wongcc2006 發表於 2017-6-27 09:46



    ini ? 無ini 架喎. 我個sendmail 純Command 黎
全部打parameter 的.

sendEmail -f ADDRESS [options]

  Required:
    -f ADDRESS                from (sender) email address
    * At least one recipient required via -t, -cc, or -bcc
    * Message body required via -m, STDIN, or -o message-file=FILE

  Common:
    -t ADDRESS [ADDR ...]     to email address(es)
    -u SUBJECT                message subject
    -m MESSAGE                message body
    -s SERVER[:PORT]          smtp mail relay, default is localhost:25

  Optional:
    -a   FILE [FILE ...]      file attachment(s)
    -cc  ADDRESS [ADDR ...]   cc  email address(es)
    -bcc ADDRESS [ADDR ...]   bcc email address(es)
    -xu  USERNAME             username for SMTP authentication
    -xp  PASSWORD             password for SMTP authentication

  Paranormal:
    -b BINDADDR[:PORT]        local host bind address
    -l LOGFILE                log to the specified file
    -v                        verbosity, use multiple times for greater effect
    -q                        be quiet (i.e. no STDOUT output)
    -o NAME=VALUE             advanced options, for details try: --help misc
        -o message-content-type=<auto|text|html|other>
        -o message-file=FILE         -o message-format=raw
        -o message-header=HEADER     -o message-charset=CHARSET
        -o reply-to=ADDRESS          -o timeout=SECONDS
        -o username=USERNAME         -o password=PASSWORD
        -o tls=<auto|yes|no>         -o fqdn=FQDN

  Help:
    --help                    the helpful overview you're reading now
    --help addressing         explain addressing and related options
    --help message            explain message body input and related options
    --help networking         explain -s, -b, etc
    --help output             explain logging and other output options
    --help misc               explain -o options, TLS, SMTP auth, and more

TOP

Phantom JS 係個 Headless Browser
Flexibility 高好多
Cross Platform 易 Scale, 踢著十幾部 Cheap Cheap  ...
~虎~ 發表於 2017-6-27 12:46



   樓主就係想簡單D幾行script , 你仲要搞到咁complicate. 如果純寫code. winform 已經收得工了

TOP

Any log?
您用咩 Connection 試?
Windows 個 sendmail 係直接用 Port 25 發信
大部分家用 ISP Block port ...
~虎~ 發表於 2017-6-27 12:51


windows 無block port 25 的. 同埋sendmail 可以用出邊SMTP with auth.

TOP

windows 無block port 25 的. 同埋sendmail 可以用出邊SMTP with auth.
556556bt 發表於 2017-6-27 13:30

您睇多次... 我話 ISP Block, not Windows block
sendmail.exe 有好多 Implementations, 首先要知係邊個
大部分 Default 都用 25 Port 自己做 MTA

TOP

本帖最後由 ~虎~ 於 2017-6-27 15:04 編輯

回覆 42# 556556bt
Ching 都幾 Insist 要用自己方法
WinForm... Syntax 我見到都唔想睇, 又 Rect 又 Bitmap
仲要安裝個 IDE + Compile?

最 Bare Minimal, Phantom JS 要做咪就係 Copy 個 Sample Code
  1. var page = require('webpage').create();
  2. page.open('http://www.hkepc.com/forum/', function() {
  3.   page.render('hkepc.png');
  4.   phantom.exit();
  5. });
複製代碼
然後
  1. phantomjs.exe hkepc.js
複製代碼
Result: http://imgur.com/a/zsgGJ

改小小 Session hijack 自己
  1. var page = require('webpage').create();

  2. page.customHeaders = {
  3.     "Cookie": "cdb_cookietime=2592000; cdb_auth=.....",
  4.     "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3141.0 Safari/537.36"
  5. }

  6. page.open('http://www.hkepc.com/forum/', function() {
  7.   page.render('hkepc.png');
  8.   phantom.exit();
  9. });
複製代碼
Result with Session: http://imgur.com/a/0jt08

TOP

Phantom JS 係個 Headless Browser
Flexibility 高好多
Cross Platform 易 Scale, 踢著十幾部 Cheap Cheap  ...
~虎~ 發表於 2017-6-27 12:46

講到咁複雜做乜...
呢舊野咪又係
C++ Wrapper + Qt.. 然後寫個JS做control.. 同我10年前寫既C++ Wrapper + Qt, Command line做control有乜野分別? 你個Qt新D囉.. 我果陣用Qt4.2...
但係本質上真係冇乜分別... 咪又係用QtWebkit webpage.cpp line 970開始..

Captcha呢個... 我聽過有API... 但我就未試過..

中文.. 好睇有冇D騎呢font... 特別簡體website... 試過D字有D粗有D幼..

TOP

phantomjs, casperjs, bash

TOP

回覆 46# 7h1r733n
PhantomJS by design 就係用來做 Headless testing / Screenshot... etc
Google 有大量 Sample Code + Tutorial
Learning Curve 就差九條街

iPhone 出之前 10 年都有 Mobile Phone + PDA, 點解紅得起?

TOP

回覆  556556bt
Ching 都幾 Insist 要用自己方法
WinForm... Syntax 我見到都唔想睇, 又 Rect 又 Bitma ...
~虎~ 發表於 2017-6-27 14:53


唔鐘意用Rect可以唔用的.. 但Bitmap呢個Drawing type就真係冇得唔用...


仲有.. 你呢個係pre compiled既"Tools", 如果download source落黎駛唔駛compile?
咁樣講真係冇乜可比性.. 要tools.. 我#6都提供左啦... 但樓主要"兩句" script喎.. 見到"兩句" script做埋capture又send 埋email... 我諗剩係config隻mail client都未必得..
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

TOP

本帖最後由 ~虎~ 於 2017-6-27 15:32 編輯

Real-world use case, 如果 Compile 係 Optional
應該無太多 User 有興趣 Compile

"兩句" script... 玩 one-liner 算唔算
不過呢個世界無免費 又滿足到咁 Specific use case 既 Tool
如果肯比錢, 寫個 Batch/Bash Wrapper 又得, 寫埋 GUI + Cross Platform Installer 都仲得

TOP