5
SM16 Autologin
Problem reported by Derek Sims - 6/9/2017 at 5:48 AM
Resolved
In previous versions of SmarterMail, the help documentation provided an HTML page that could be used to automate the login for SmarterMail (http://help.smartertools.com/SmarterMail/v16/GeneratePdf.ashx?page=%2fSmarterMail%2fv16%2fTopics%2fSystemAdmin%2fMisc%2fAutoLogin.aspx), which we use very heavily in our mail environment. This was not updated for SmarterMail 16 and no longer works.
 
Is there any plans to update this for SM16 or has anyone found any solutions for this? 

19 Replies

Reply to Thread
1
Derek Sims Replied
Bump
1
Derek Curtis Replied
Employee Post
We'll work on a new script and update Help accordingly. Once we have something, I'll update this thread. 
Derek Curtis COO SmarterTools Inc. (877) 357-6278 www.smartertools.com
2
Larry Duran Replied
Employee Post Marked As Resolution
We have an updated script that works with v16.  We're in the process now of updating the document to reflect the new script changes.  I supplied the new script to Derek Sims and he verified it works in his environment.
 
Thanks again for reporting the issue.
Larry Duran Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
1
Derek Curtis Replied
Employee Post
We're publishing the help doc now with the updated page code. So for SmarterMail 16.x and beyond, this is good to go. 
Derek Curtis COO SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Paul White Replied
I tired the new script, but I had to modify it so I could pass in my domain user and pass.  When I try to run it I am getting 
 
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.  Is there something I need to setup on smartermail to make this possible?
0
Shaun Peet Replied
Assuming IIS, this needs to be in the web.config (or be the web.config)
 
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpProtocol>
             <customHeaders>
               <add name="Access-Control-Allow-Origin" value="*" />
            </customHeaders>
        </httpProtocol>
    </system.webServer>
</configuration>
 
0
Larry Duran Replied
Employee Post
Hello Paul, we added that to the header for the authenticate-user API call which is in the release for today. So you can do what Shaun suggested below, or you can update your SmarterMail server to today's release.
Larry Duran Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Paul White Replied
I updated my server to the June 16, 2017 release.  When I try auto login its still not working.  I just get the page coming up with the login boxes. Its not logging in. I am using the latest version of chrome.
0
Larry Duran Replied
Employee Post
Is the page that's hosting the script part of the same domain as the SmarterMail web interface? They need to be with this new script because of how the authentication tokens are saved in the browser.
Larry Duran Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Paul White Replied
The script is being hosted locally, as a static HTML file I run from my desktop. I then modified it to call the domain. The idea was to open the script from my desktop so I could 1 click login into various email accounts that I needed to handle bounces on. The way you describe it sounds like I also need to run this script directly in the smarter mail directory under each domain, but this is not desirable.
0
Larry Duran Replied
Employee Post
That is correct Paul. It has to be done this way because of how the browser stores the token (on a per domain basis). Another way around this would be to host a file on the SmarterMail server that could read in the username/password from the files hosted on your desktop. So your files on your desktop execute a call to the hosted file on the SmarterMail domain, which reads in the username/password and then executes the script from there. I think this should work...although I have not tried it myself.
Larry Duran Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Paul White Replied
Thanks for the suggestion. I setup the script on the mail server, so I can pass my login information to it. works great. Thanks!
0
Larry Duran Replied
Employee Post
Excellent! Thanks for letting us know Paul.
Larry Duran Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Thomas Chapman Replied
where is the new script? If you are talking about the Automating Login to SmarterMail 16x help

Then that is just awful. That code opens just like being on the main landing page of the smartermail login.

Derek I have been a loyal smartertools user since 2005. It was bad not having the new API info when V16 was released but We just need a simple login form that our clients can use on the front page of our site. Bhosted dot net Please help no one at smartertools has been able to yet. Thank you Thomas Chapman
0
Thomas Chapman Replied
Matt Petty has been trying to help posted some great looking code and after days of not being able to get it to work he then has just said his mistake the code he posted only works on V17. I can't post links here so I cant show you.
0
Matthew Hall Replied
I have added this to the web.config, and used the script here (https://help.smartertools.com/SmarterMail/v16/Default.aspx?qq=%2fSmarterMail%2fv16%2fTopics%2fSystemAdmin%2fMisc%2fAutoLogin.aspx)

But i just get a spinning circle saying "logging you on" in Chrome, and just a login box in IE 11

Am i missing a step?
Matthew Hall System Administrator Farrell Heyworth
0
Andrea Free Replied
Employee Post
Hi all,

Just a quick update... I wanted to let you know that in SmarterMail 16.3.6855, the HTML code for automating user login has been changed to utilize new API calls for a better user experience. The previous script provided in the SmarterMail Online Help will only function for versions 16.0.6345 - 16.3.6843. Please be sure to update your auto-login code prior to upgrading to version 16.3.6855 or higher. Both scripts are available in the Online Help documentation: Automating Login to SmarterMail.
Andrea Free SmarterTools Inc. 877-357-6278 www.smartertools.com
0
Patrick Huss Replied
Hi Andrea,

I want to point out that the new script, as provided in the reference documentation, is working fine for Edge, Firefox and Chrome but with Internet Explorer 11  it is not working ;-( 

UPDATE: the version online in the reference documentation from October 15th 2018 is working now also in IE11

UPDATE 2: If you update the error Handling line: 
document.getElementById("errors").innerText = failure.message || failure;
to fix the failure is undefined, the example is finally working

Happy to do your beta testing ;-)



0
Andrea Free Replied
Employee Post
Hi Patrick,

Thanks for reporting that. The current documentation has the updated error handling line. Glad things are working as expected! 
Andrea Free SmarterTools Inc. 877-357-6278 www.smartertools.com

Reply to Thread