# Send mail via server which require SMTP authentication

**URL:** <https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742>\
**Category:** The Dude\
**Created:** [October 23, 2010, 9:44pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742 "2010-10-23T21:44:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![ditonet](https://forum.mikrotik.com/letter_avatar/ditonet/32/6_449c533f586939b6e5f246632a46421f.png) [@ditonet](https://forum.mikrotik.com/u/ditonet)\
**Post date:** [October 23, 2010, 9:44pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/1 "2010-10-23T21:44:23Z")

</div>

Hi,

Here is my small utility to send mail via server which require SMTP authentication.  
To configure it to work with your mail acount, run it with command-line parameter 'config, e.g:  
dito\_asms.exe config  
Small window will appear, fields content is self-explanatory  
 ![dito_asms_gui.JPG](https://data-discourse.cdn.mikrotik.com/original/2X/a/a32a3d3349a4ddecd449c219cd345fe7e3aea817.jpeg)  
Fill all fields, test and save your settings.  
Settings are stored in registry in key ‘HKEY\_CURRENT\_USER\Software\DITO’ and they are encrypted using AES-128 algorithm.  
To send mail run app with three command-line parameters: ‘TO address’ ‘Subject’ ‘Mail body’, e.g.:  
“C:\Program Files\Dude\dito\_asms.exe” [nobody@nowhere.com](mailto:nobody@nowhere.com) “Service [Probe.Name] on [Device.Name] is now [Service.Status]” “([Service.ProblemDescription])”  
A parameter that contains spaces must be surrounded by “double quotes”.  
Tested on Win XP and Win 7, works from Dude 🙂 (thanks to gsandul).

Regards, Grzegorz.

EDIT: the file was removed, there is already a newest version, check my last post

---

<div class="post-metadata">

**Author:** ![condei](https://forum.mikrotik.com/letter_avatar/condei/32/6_449c533f586939b6e5f246632a46421f.png) [@condei](https://forum.mikrotik.com/u/condei)\
**Post date:** [November 11, 2010, 5:48pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/2 "2010-11-11T17:48:41Z")

</div>

Can I use your app to send to several mail accounts? How is that achieved?  
I tried to separate mail addresses with commas with no luck

Ivan Conde

---

<div class="post-metadata">

**Author:** ![chrisd13](https://forum.mikrotik.com/letter_avatar/chrisd13/32/6_449c533f586939b6e5f246632a46421f.png) [@chrisd13](https://forum.mikrotik.com/u/chrisd13)\
**Post date:** [November 12, 2010, 4:31pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/3 "2010-11-12T16:31:22Z")

</div>

Maybe setup a distribution group that you can add the email addresses to and then just add that one into the SMTP app. (if multiple addresses can not be put into the field). 🙂

---

<div class="post-metadata">

**Author:** ![ditonet](https://forum.mikrotik.com/letter_avatar/ditonet/32/6_449c533f586939b6e5f246632a46421f.png) [@ditonet](https://forum.mikrotik.com/u/ditonet)\
**Post date:** [November 12, 2010, 11:19pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/4 "2010-11-12T23:19:54Z")

</div>

Hi,

Here is new version (1.0.0.15) which support multiple recipients:  
[dito\_asms.zip](https://forum.mikrotik.com/uploads/short-url/9bmS4FCTU9oapX62jZr2oRxavXM.zip) (304 KB)  
Syntax is:

```plaintext
"C:\Program Files\Dude\dito_asms.exe" "nobody@nowhere.com,billg@microsomething.com" "Service [Probe.Name] on [Device.Name] is now [Service.Status]" "([Service.ProblemDescription])"

```

List of recipients must be surrounded by double quotes, comma is delimiter, no spaces.

Regards, Grzegorz.

---

<div class="post-metadata">

**Author:** ![Mandrax](https://forum.mikrotik.com/letter_avatar/mandrax/32/6_449c533f586939b6e5f246632a46421f.png) [@Mandrax](https://forum.mikrotik.com/u/Mandrax)\
**Post date:** [November 26, 2010, 2:41pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/5 "2010-11-26T14:41:05Z")

</div>

HI

i’m getting ‘test mail failed with error code 0’ every time I click on test settings

I’m using Windows 7

---

<div class="post-metadata">

**Author:** ![Mandrax](https://forum.mikrotik.com/letter_avatar/mandrax/32/6_449c533f586939b6e5f246632a46421f.png) [@Mandrax](https://forum.mikrotik.com/u/Mandrax)\
**Post date:** [November 29, 2010, 5:50am UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/6 "2010-11-29T05:50:08Z")

</div>

Hi

Cant seem to get this thing up and running.every time if I click on the test settings I get a test mail failed with error code 3 or 0

Can somebody please help me

---

<div class="post-metadata">

**Author:** ![ditonet](https://forum.mikrotik.com/letter_avatar/ditonet/32/6_449c533f586939b6e5f246632a46421f.png) [@ditonet](https://forum.mikrotik.com/u/ditonet)\
**Post date:** [November 29, 2010, 9:32am UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/7 "2010-11-29T09:32:02Z")

</div>

Hi,

This application was tested on Win7 by me and everything was good.  
Attached you can find latest version (1.0.0.16) which logs communication with SMTP server during testing to file.  
[dito\_asms.zip](https://forum.mikrotik.com/uploads/short-url/pb5m6Ow2WqoEkvn90bX3DNywlyC.zip) (304 KB)  
This file named ‘dito\_asms.log’ is located in app directory.  
Hope this helps.

Regards, Grzegorz.

---

<div class="post-metadata">

**Author:** ![Mandrax](https://forum.mikrotik.com/letter_avatar/mandrax/32/6_449c533f586939b6e5f246632a46421f.png) [@Mandrax](https://forum.mikrotik.com/u/Mandrax)\
**Post date:** [November 29, 2010, 12:01pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/8 "2010-11-29T12:01:27Z")

</div>

I did what you said and still no luck

i have attached a screen shot of the settings I’m using and the log file.  
Do i need too change something in dude accept for the string I need to put in

Thanx for the help  
 ![Dude.JPG](https://data-discourse.cdn.mikrotik.com/original/2X/9/9d44e865bbf997c7cc879ec8885f6ee67f857611.jpeg)

---

<div class="post-metadata">

**Author:** ![ditonet](https://forum.mikrotik.com/letter_avatar/ditonet/32/6_449c533f586939b6e5f246632a46421f.png) [@ditonet](https://forum.mikrotik.com/u/ditonet)\
**Post date:** [November 29, 2010, 12:17pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/9 "2010-11-29T12:17:07Z")

</div>

Hi,

Log file clearly shows that is no response from mail server. Typical log looks like this:

> 2010-11-29 10:25:05 : 10:25:05 EHLO NITEWORX
> 
> 2010-11-29 10:25:05 : 10:25:05 250-0002.srv.abc.pl Hello dwg47.internetdsl.tpnet.pl [82.x.y.z]  
> 250-SIZE 52428800  
> 250-PIPELINING  
> 250-AUTH PLAIN LOGIN  
> 250-STARTTLS  
> 250 HELP
> 
> 2010-11-29 10:25:05 : 10:25:05 AUTH LOGIN
> 
> 2010-11-29 10:25:05 : 10:25:05 334 3JzpomFEqyfi

Maybe this app is blocked by firewall, check this.

Regards, Grzegorz.

---

<div class="post-metadata">

**Author:** ![Mandrax](https://forum.mikrotik.com/letter_avatar/mandrax/32/6_449c533f586939b6e5f246632a46421f.png) [@Mandrax](https://forum.mikrotik.com/u/Mandrax)\
**Post date:** [November 29, 2010, 1:28pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/10 "2010-11-29T13:28:50Z")

</div>

Hi

Okay it seem that we’re getting some where now

I changed the port of gmail to 587 and then the program confirms that the mail have been sent but still nothing in my inbox

see attached for log file

Thanx for the quick reply’s

PS. turning of the firewall didn’t help much  
[dito\_asms.log](https://forum.mikrotik.com/uploads/short-url/AbHLRwvIV0wsN2QmfjOtKFRVo0Y.log) (1.9 KB)

---

<div class="post-metadata">

**Author:** ![ditonet](https://forum.mikrotik.com/letter_avatar/ditonet/32/6_449c533f586939b6e5f246632a46421f.png) [@ditonet](https://forum.mikrotik.com/u/ditonet)\
**Post date:** [November 29, 2010, 1:35pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/11 "2010-11-29T13:35:11Z")

</div>

Hi,

GMail server requires TLS, but this is not supported by this simple app, sorry.

Regards, Grzegorz.

---

<div class="post-metadata">

**Author:** ![stmx38](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/stmx38/32/442_2.png) [@stmx38](https://forum.mikrotik.com/u/stmx38)\
**Post date:** [December 10, 2010, 2:41pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/12 "2010-12-10T14:41:51Z")

</div>

Maybe it will work with stunnel ?  
[Email notification throughout Gmail on Windows machine](http://forum.mikrotik.com/t/dude-email-notifications-through-gmail-on-windows-via-blat/28399/8)

---

<div class="post-metadata">

**Author:** ![ditonet](https://forum.mikrotik.com/letter_avatar/ditonet/32/6_449c533f586939b6e5f246632a46421f.png) [@ditonet](https://forum.mikrotik.com/u/ditonet)\
**Post date:** [December 10, 2010, 3:47pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/13 "2010-12-10T15:47:44Z")

</div>

Hi,

Really good idea with ‘stunnel’.  
Personally I don’t use GMail so I’m not able to test this solution.  
IMHO if ‘blat’ works my app also should works, same parameters to set.  
For me only one disadvantage of ‘blat’ is that every mail account parameter is available as plain text, no encryption at all.

Regards, Grzegorz.

---

<div class="post-metadata">

**Author:** ![jacekarwal](https://forum.mikrotik.com/letter_avatar/jacekarwal/32/6_449c533f586939b6e5f246632a46421f.png) [@jacekarwal](https://forum.mikrotik.com/u/jacekarwal)\
**Post date:** [June 13, 2011, 9:25am UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/14 "2011-06-13T09:25:13Z")

</div>

Another interesting solution is [http://commandlinesendmail.blogspot.com/](http://commandlinesendmail.blogspot.com/). Uisng this program you can create such notification :

“c:\Program Files\Dude\senditquiet.exe” -s mymailserwer -port 587 -u mailuser -protocol normal -p mailpassword -f mymailaddress -t toaddress -subject “[Probe.Name] na [Device.Name] [Service.Status]” -body “[Probe.Name] na [Device.Name] [Service.Status]”

Of cource first copy senditquiet to your dude dir.  
Regards

Jacek from [http://www.arwal.com.pl](http://www.arwal.com.pl)

---

<div class="post-metadata">

**Author:** ![Ibersystems](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/ibersystems/32/196_2.png) [@Ibersystems](https://forum.mikrotik.com/u/Ibersystems)\
**Post date:** [December 13, 2013, 2:20pm UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/15 "2013-12-13T14:20:38Z")

</div>

Hello, we managed with this problem.

We used Dude with a yahoo account without authentication in 450G boards (example). Yahoo started this week to use authentication. To fix this you have to go to /tool email set starttls=yes

---

<div class="post-metadata">

**Author:** ![Ibersystems](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/ibersystems/32/196_2.png) [@Ibersystems](https://forum.mikrotik.com/u/Ibersystems)\
**Post date:** [January 16, 2014, 8:24am UTC](https://forum.mikrotik.com/t/send-mail-via-server-which-require-smtp-authentication/41742/16 "2014-01-16T08:24:27Z")

</div>

U need more entries instead of one.
