Come inviare un messaggio da linea comando

Share

Un ottimo programma freeware che consente di inviare un email da linea comando è  Blat – Windows Command Line SMTP Mailer.

Blat è disponibile per Windows nelle versioni 32 e 64 bit e invia email usando il protocollo SMTP o post a usenet tramite NNTP. E’ un programma molto leggero. Utile per creare dei programmi con all’interno un comando di invio di messaggi,  evitando in questo modo di usare specifici programmi di posta elettronica come Outlook.

Syntax:
  Blat <filename> -to <recipient> [optional switches (see below)]
  Blat -install <server addr> <sender's addr> [<try>[<port>[<profile>]]] [-q]
  Blat -profile [-delete | "<default>"] [profile1] [profileN] [-q]
  Blat -h

Blat run from a Batch file ( esempio )

@echo off
:::::::::::::: Lets set some variables ::::::::::::::
set eMail=tim@blat.tld
set subj=-s "Test Blat"
set server=-server localhost
set x=-x "X-Header-Test: Can Blat do it? Yes it Can!"
set debug=-debug -log blat.log -timestamp 
::::::::::::::::: Now we run Blat!  :::::::::::::::::
blat %0 -to %eMail% -f %eMail% %subj% %server% %debug% %x%
The above resolves to the right (all on one line) blat
batch.bat
-to tim@blat.tld
-f tim@blat.tld
-s “Test Blat”
-server localhost
-debug
-log blat.log
-timestamp
-x “X-Header-Test: Can Blat do it? Yes it Can!”

 

Link : Blat.net

I commenti sono chiusi.