Dude - Email notifications through Gmail on Windows - via blat

i just want to say a big thank you to slech

thank you for the help and time !

Glad to help you, David1234!

It seems that the issue was in stunnel.conf.
Now I mentioned in instruction that is preferred to create this file from scratch.

yes I think it’s better that way

Good job!

1 more question -
if I want to send to 2 email address , can I do this?

never mind - manage to do this
all that was need to do is add a " , " between mails
1@gmail.com,2@gmail.com

but now another question -
if I want to make 1 mail as a CC or a even BCC , can it be done?


thanks ,

You can have multiple receipients in one command.
for example blat.exe -to tst@domain.com,tst2@domain.com
Seperate the email addresses with comma but do NOT add a space after the comma..

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 ,

Yes, no probemen!

blat -to me@test.com -cc myemail1@test.com -bcc invisible@test.com

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
::
::
::"%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:

::
:: 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

Thanks !

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

2014.05.13 14:12:26 (Tue)------------Start of Session-----------------
Blat v3.1.2 (build : Dec 27 2013 14:33:12)
32-bit Windows, Full, Unicode
<<<getline<<< 220 mx.google.com ESMTP m44sm39823168eeh.14 - gsmtp

putline>>> EHLO bork.gmail.com
<<<getline<<< 250-mx.google.com at your service, [188.40.84.130]
<<<getline<<< 250-SIZE 35882577
<<<getline<<< 250-8BITMIME
<<<getline<<< 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN
<<<getline<<< 250-ENHANCEDSTATUSCODES
<<<getline<<< 250 CHUNKING
Sending stdin.txt to mygmailreciver@gmail.com
Subject: Test subject
Login name is mygmailsender@gmail.com
putline>>> AUTH PLAIN *****
<<<getline<<< 535-5.7.8 Username and Password not accepted. Learn more at
<<<getline<<< 535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 m44sm39823168eeh.14 - gsmtp
*** Warning *** The SMTP server did not accept Auth PLAIN value.
*** Warning *** Are your login userid and password correct?
putline>>> AUTH LOGIN
<<<getline<<< 334 VXNlcm5hbWU6
putline>>> ZW9mZmljZW10cmVwb3J0c0BnbWFpbC5jb20=
<<<getline<<< 334 UGFzc3dvcmQ6
putline>>> ZW9mZmljZTI5
<<<getline<<< 535-5.7.8 Username and Password not accepted. Learn more at
<<<getline<<< 535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 m44sm39823168eeh.14 - gsmtp
*** Warning *** The SMTP server did not accept Auth LOGIN PASSWD value.
putline>>> QUIT
<<<getline<<< 221 2.0.0 closing connection m44sm39823168eeh.14 - gsmtp
2014.05.13 14:12:27 (Tue)-------------End of Session------------------

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:

  1. In The Dude → settings, tab General, set Primary SMTP server to 127.0.0.1
  2. Create a new notification, type email, server 127.0.0.1, to: your desired receipient
  3. Install the SMTP Server and SMTP Server Tools features
  4. configure the Simple Mail Transfer Protocol(SMTP) to start automatically and start that service
  5. Go to Start → administrative tools → Internet Information Services (IIS) 6.0 Manger
  6. Open the properties of the SMTP Virtual Server #1
  7. Tab Access, button Relay, set Only the list below and add the localhost ip (127.0.0.1) to the granted list
  8. Tab Delivery, klik outbound security, choose Basic authentication and fill in your COMPLETE email as user and the apropriate password (use app specific password if you use 2 step authentication)
  9. Mark the TLS encryption box! and click ok, now still in the Delivery tab, click on outbound connections and set the TCP port to 587
  10. Klik ok, and still in the Delivery tab, click Advanced. Set the smart host to smtp.gmail.com, do NOT mark the boxes below that.
  11. Click ok twice, now where back in the IIS manager. Close that, do a restart of the SMTP service and test the notification

This should work, it does for me…

Regards,
Roland

midolinho
Please post here your stunnel.conf file content.

Thx Roland, ill try this steps and post the results asap.

slech this is my stunnel.conf

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 = 587
connect = smtp.gmail.com:587

i changed ssmtp from 465 to 587 (tried both).

Thx guys for posting

midolinho
Can you try new guide using mailsend ?
Email notification through Gmail on Windows - via mailsend.

Slech, new mailsend setup work like charm.
Thanks m8

@Roland:
Ty for reply, SMTP service somehow losses .dll files needed to run explorer.exe (WinXP SP3), so i didnt try further, i install mailsend. Thank you for sugestions

:smiley: I’m Happy now :smiley:

Hi..
I have been trying to set an email notification on Dude following all the steps that I saw above and I think that I did everything correctly but it is not working, I would like some help.. when I create the notification and press the button “Test”.. a cmd window that appears but just for second and then it disappears (I can´t even read what it says), is that correct or it has to appear and stay longer??
Just to let you know I am running the Dude on Windows server 2008 R2 and It is installed in a Virtual Machine..
I will appreciate some help, thanks..!!

carlossu,
to debug blat you should change your emailblat.cmd as mentioned in it(in this example debugging section already uncommented):

::
::“%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
::

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.

As alternative to blat + stunnel you can setup mailsend: Email notification through Gmail on Windows - via mailsend.

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.

Hi slech;

Thaks for the reply.. I attached the images with the currently stunnel and blat configuration.. could you watch them and verify if everything is correct? thanks..
Untitled1.png
Untitled.png

carlossu, please fix this line in your stunnel.conf

connect = smtp.gmail.com:465

Also provide please content of emailblat.log.