Error sending mail from Windows Task Scheduler to NowSMS

Error sending mail from Windows Task Scheduler to NowSMS SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through November 14, 2013 » Error sending mail from Windows Task Scheduler to NowSMS « Previous || Next »
Author Message
Marcel de Jong
New member
Username: Dttmars

Post Number: 1
Registered: 06-2013
Posted on Tuesday, June 04, 2013 - 01:06 pm:   

Hi all, I am testing this software as a solution for email to sms notifications. I activated MMSC Service, used the default port numbers for http and smtp. Ip address is set to "All available", local host name is "server.domain.com", domain name for mms e-mail to "mms.domain.com" and enabled the other options. As domain for "email to sms" i use "nowsms.domain.com". In the Authorised Email to SMS" windows i added "*@server.domain.com".
After that i opened EventViewer on the sms server, opened Application log, searched for the event on which i want to attach a task. In the email field i entered the following: from: [servername]@server.domain.com, to:[phonenumber]@server.domain.com and smtp server:[server.domain.com].

But when the event happens no mail is send. I see in the task manager as last run result 0x80040211.
I know this has something to with permissions. I spend all day already figuring out how to fix this, but i am out of options.
Maybe you can point me in the right direction.
Thanks for any help.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4524
Registered: 08-2008
Posted on Tuesday, June 04, 2013 - 04:53 pm:   

Hi Marcel,

This seems to be a common problem with e-mail alerts from the Windows Event Viewer. You will find numerous discussion threads about this on Microsoft Technet.

These are the best descriptions that I found:

http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/f087c57c-57 b8-4c7f-ba2a-feb04c51f5ba/
http://social.technet.microsoft.com/Forums/en-JM/winservergen/thread/658c724f-05 5b-4d99-a0b9-5040e3353f2b

Basically, if you enable the MMSCDEBUG.LOG in NowSMS, you'll see the same problem as these discussion threads describe occurring with other non-Microsoft SMTP servers.

The scheduled task makes an SMTP connection. It then sends the EHLO command, followed by the AUTH LOGIN command, and at this point the client aborts the connection. Apparently the reason is because the Microsoft client does not actually support AUTH LOGIN, but it uses a common code library that sort of supports it ... hence the error.

The crazy thing is that from the NowSMS side, we don't strictly require AUTH LOGIN. We are just advertising that support for it is available if the client wants to use this.

Apparently, this bug/feature prevents the Event Viewer e-mail alerts from working with almost all non-Microsoft SMTP servers.

I have to admit that I was intrigued by your question as I had no idea that the Windows Event Viewer had this type of built-in functionality. So I pushed our team to investigate more.

Toward that end, there are 3 potential solutions:

1.) Use a command line mailer, instead of the direct e-mail interface, such as blat.

Basic command line parameters for blat would be:

-server 192.168.0.12 -f sender@domain.com -t number@domain.com -subject "Subject Line" -body "Message Body Text"

2.) The latest version of NowSMS has an alternative e-mail configuration available. Instead of receiving e-mail via SMTP, it can also retrieve messages from a POP3 or IMAP mailbox. To send an SMS, you send the e-mail to the POP3 or IMAP mailbox with the recipient phone number in the subject line. NowSMS downloads the e-mail and routes to SMS.

So, if you can manage to get event viewer to send to some other mailbox, NowSMS can get the e-mail that way.

This support is brand new ... we have not made this the official download release yet, but it is close. A version with this support can be downloaded at http://www.nowsms.com/download/nowsms20130531.zip

3.) For the next update (in about two weeks), we have extended support for the SMTPIPAddressList configuration parameter. This configuration parameter allows for a list of trusted IP addresses that are allowed to submit SMTP without further validation.

When an SMTP connection is received from a trusted IP address in this list, the NowSMS server will not advertise AUTH LOGIN support. As a result, the Event Viewer Scheduled Task will not get confused and will just work. This update should be available the week of June 17.

--
Des
NowSMS Support
Marcel de Jong
New member
Username: Dttmars

Post Number: 2
Registered: 06-2013
Posted on Wednesday, June 05, 2013 - 06:34 am:   

Hi Des, thanks for your answer.
The option to use Blat works. I prefer to use smtp so i will wait until the next update and test it again.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4588
Registered: 08-2008
Posted on Friday, August 02, 2013 - 05:25 pm:   

Hi Marcel,

Apologies for the delay in follow-up. We have addressed this issue with an optional configuration setting.

Here's the way we described this change in our changes log:

* E-Mail from Windows Event Viewer Monitoring: When an SMTP connection is received from an IP address listed in MMSC.INI [MMSC] SMTPIPAddressList=, the EHLO response will not advertise support for AUTH LOGIN. This works around a bug (feature) where Windows Event Viewer can only send e-mail to Microsoft SMTP servers or SMTP servers that do not advertise any AUTH support.

For clarification, the SMTPIPAddressList parameter is a comma delimited list of trusted IP addresses that are allowed to submit SMS messages via SMTP without authentication.

Under the [MMSC] section header of MMSC.INI, you can add a parameter:

SMTPIPAddressList=ip.address.1,ip.address.2,192.168.1.*

This parameter can have a comma-delimited list of IP addresses (no white space, if you specify multiple addresses, separate with a comma only) that are allowed to connect via SMTP and send to *any* phone number using an addressing format of phonenumber@mms.or.sms.domain.name. The IP addresses specified, can also include a “*” place holder as a wildcard match for all addresses in that network (e.g., 192.168.0.* to authenticate all IP addresses in that particular range).

This support is present in the NowSMS update at http://www.nowsms.com/download/nowsms20130731.zip and will continue to be supported in future releases.

--
Des
NowSMS Support

Login Login / Register Logout Logout Search Last 30 Days Topics Topics