You can have multiple receipients in one command.1 more question -
if I want to send to 2 email address , can I do this?
or do I need to create a new notification called "Email blat" with another file call emailblat1.cmd?
thanks ,
Yes, no probemen!yes I have understood it ,
now what about the other question -
if I want to make 1 mail as a CC or a even BCC , can it be done?
Thanks ,
blat -to me@test.com -cc myemail1@test.com -bcc invisible@test.com
::
:: Send email notifications from Dude via Gmail
::
set blatdir=C:\Program Files\Dude\blat
set smtpsender=testing@gmail.com
set smtpserver=127.0.0.1
set smtpport=465
set smtpuser=testing
set smtppwd=pass
set mailto=testing@gmail.com
::
::
::"%blatdir%\blat.exe" -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %1 -body %2
::
:: Uncomment for debug only (Comment previous line. Do not forget to return back after debugging!!!)
Ok, lets assume you want to add a cc receipient, then the file will be:O.K
but how do I change it in the file?
::
:: Send email notifications from Dude via Gmail
::
set blatdir=C:\Program Files\Dude\blat
set smtpsender=testing@gmail.com
set smtpserver=127.0.0.1
set smtpport=465
set smtpuser=testing
set smtppwd=pass
set mailto=testing@gmail.com
set mailcc=testing2@gmail.com
::
::
"%blatdir%\blat.exe" -to %mailto% -cc %mailcc% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %1 -body %2
I would like to suggest to do an out-of-the-box solution for this problem. Don't use Stunnel, use your local SMTP server (that can be installed as a Feature, don't forget to include the IIS 6 management console to configure it). This local SMTP server can be configured in The Dude (127.0.0.1 as server) and can then directly remail it trough the Gmail server. The setup is as follows:Greetings to all,
I have problem with this setup, stunnel is instaled as service and working, but i have problem with blat. seems its some auth problem and i can getmy finger on it. please help, this is debug file.Why is AUTH PLAIN and why ''The SMTP server did not accept Auth PLAIN value'' how to change that
Then try one more time to pres Test button. As a result emailbtal.log will be created.::
::"%blatdir%\blat.exe" -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %1 -body %2
::
:: Uncomment for debug only (Comment previous line. Do not forget to return back after debugging!!!)
::
"%blatdir%\blat.exe" -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject "Test subject" -body "Test body" -debug -log emailbtal.log
::
pause
::
Hi slech;Then try one more time to pres Test button. As a result emailbtal.log will be created.
Post it here, please.
Also verify your stunnel.conf. It should contain only lines mentioned in first post of this topic.
Also provide please content of emailblat.log.connect = smtp.gmail.com:465
#debug = 7socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
#debug = 7
#output = stunnel.log
[ssmtp]
accept = 465
client = yes
connect = 192.168.XXX.XXX:8080
protocol = connect
protocolAuthentication = basic
protocolUsername =your_proxy_login
protocolPassword =your_proxy_password
protocolHost = smtp.yandex.ru:465
rem @echo off
set dir=C:\blat
set logname=%dir%\blat.log
set smtpsender=dude-XXXXXX@yandex.ru
set smtpserver=127.0.0.1
set smtpport=465
set smtpuser=dude-XXXXXX@yandex.ru
set smtppwd=XXXXXXXXXX
set mailto=XXXXXXXXXXXXX@gmail.com
set subject=%1
set body=%2
IF NOT EXIST %logname% echo ====================== Start of file ====================== > %logname%
echo. >> %logname%
echo ====================== %time% ====================== >> %logname%
C:
CD %dir%
echo CMD: blat.exe -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %subject% -body %body% >> %logname%
blat.exe -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %subject% -body %body% >> %logname%
stunnel.conf
Sample stunnel configuration file for Win32 by Michal Trojnara 2002-2012
; Some options used here may be inadequate for your particular configuration
; This sample file does *not* represent stunnel.conf defaults
; Please consult the manual for detailed description of available options
; **************************************************************************
; * Global options *
; **************************************************************************
; Debugging stuff (may useful for troubleshooting)
;debug = 7
;output = stunnel.log
; Disable FIPS mode to allow non-approved protocols and algorithms
;fips = no
; **************************************************************************
; * Service defaults may also be specified in individual service sections *
; **************************************************************************
; Certificate/key is needed in server mode and optional in client mode
cert = stunnel.pem
;key = stunnel.pem
; Authentication stuff needs to be configured to prevent MITM attacks
; It is not enabled by default!
;verify = 2
; Don't forget to c_rehash CApath
;CApath = certs
; It's often easier to use CAfile
;CAfile = certs.pem
; Don't forget to c_rehash CRLpath
;CRLpath = crls
; Alternatively CRLfile can be used
;CRLfile = crls.pem
; Disable support for insecure SSLv2 protocol
options = NO_SSLv2
; Workaround for Eudora bug
;options = DONT_INSERT_EMPTY_FRAGMENTS
; These options provide additional security at some performance degradation
;options = SINGLE_ECDH_USE
;options = SINGLE_DH_USE
; **************************************************************************
; * Service definitions (at least one service has to be defined) *
; **************************************************************************
; Example SSL server mode services
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
;debug = 7
;output = stunnel.log
client = yes
[pop3s]
accept = 995
connect = pop.gmail.com:995
[ssmtp]
accept = 465
connect = smtp.gmail.com:465
[/color]
; Example SSL client mode services
;[gmail-pop3]
;client = yes
;accept = 127.0.0.1:110
;connect = pop.gmail.com:995
;[gmail-imap]
;client = yes
;accept = 127.0.0.1:143
;connect = imap.gmail.com:993
;[gmail-smtp]
;client = yes
;accept = 127.0.0.1:25
;connect = smtp.gmail.com:465
; Example SSL front-end to a web server
;[https]
;accept = 443
;connect = 80
; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SSL
; Microsoft implementations do not use SSL close-notify alert and thus
; they are vulnerable to truncation attacks
;TIMEOUTclose = 0
; vim:ft=dosini
set blatdir=C:\Program Files\Dude\blat\mailblat.cmd
set smtpsender=XXXXXXXX@gmail.com
set smtpserver=127.0.0.1
set smtpport=465
set smtpuser=XXXXXXXXXX@gmail.com
set smtppwd=MYPASSWORD
set mailto=XXXXXXXXXXX@gmail.com
"%blatdir%\blat.exe" -to %XXXXXXXXX@gmail.com% -f %XXXXXXXXXX@gmail.com% -server %127.0.0.1% -port %465% -u %XXXXXXXXXX@gmail.com% -pw %MYPASSWORD% -subject %1 -body %2
Name: Email Externo
Type: Execute on server
(Insertar Variale)
Command: "C:\Program Files (x86)\Dude\blat\mailblat.cmd" "Service [Probe.Name] on [Device.Name] is now [Service.Status]" "Service [Probe.Name] on [Device.Name] is now [Service.Status] ([Service.ProblemDescription])"
this is the stunnel.conf2016.11.10 13:21:14 (Thu)------------Start of Session-----------------
Blat v3.2.0 (build : Dec 27 2013 14:37:23)
32-bit Windows, Full, Unicode
Error: Server refused connection.
2016.11.10 13:21:15 (Thu)-------------End of Session------------------
and this is the cmd filesocket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
debug = 7
output = stunnel.log
client = yes
[pop3s]
accept = 995
connect = pop.gmail.com:995
[ssmtp]
accept = 465
connect = smtp.gmail.com:465
what could it be?::
:: Send email notifications from Dude via Gmail
::
set blatdir=C:\Program Files\Dude\blat
set smtpsender=MyEmail@gmail.com
set smtpserver=127.0.0.1
set smtpport=465
set smtpuser=MyEmail
set smtppwd=MyPassword
set mailto=david@gmail
set mailcc=david1@korenron.co.il
::
::
::"%blatdir%\blat.exe" -to %mailto% -cc %mailcc% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %1 -body %2
::
:: Uncomment for debug only (Comment previous line. Do not forget to return back after debugging!!!)
::
"%blatdir%\blat.exe" -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject "Test subject" -body "Test body" -debug -log emailbtal.log
::
::pause
::
Why you are still using Blat with stunnel? There is a better solution like Mail Alert Simple Mailer (https://sourceforge.net/projects/mail-alert/) which natively supports SSL/STARTTLS and stores encrypted SMTP password in configuration file.I think the problem was that the servids wasn't running.....
strange but at least we found it
Thanks !