Ninko 63 Posted May 30, 2020 Author Share Posted May 30, 2020 @@Luke There is definitely something wrong with the plugin, could you look into it please? Thanks Link to comment Share on other sites More sharing options...
Luke 37064 Posted May 30, 2020 Share Posted May 30, 2020 Why do you feel that way? Link to comment Share on other sites More sharing options...
Ninko 63 Posted May 30, 2020 Author Share Posted May 30, 2020 Because ever since changing the settings from Google, no matter which other SMTP I use it just gives me an error! Thanks Link to comment Share on other sites More sharing options...
Luke 37064 Posted May 31, 2020 Share Posted May 31, 2020 Because ever since changing the settings from Google, no matter which other SMTP I use it just gives me an error! Thanks What error? Link to comment Share on other sites More sharing options...
Ninko 63 Posted May 31, 2020 Author Share Posted May 31, 2020 Attached. Link to comment Share on other sites More sharing options...
Luke 37064 Posted May 31, 2020 Share Posted May 31, 2020 Server log? Link to comment Share on other sites More sharing options...
Ninko 63 Posted May 31, 2020 Author Share Posted May 31, 2020 (edited) Attached Edited June 5, 2020 by Ninko Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted May 31, 2020 Share Posted May 31, 2020 (edited) System.Net.Mail.SmtpException: Response format is wrong.(Z) Interesting, looks like an encrypted format like tls or ssl. Maybe using the wrong protocol? Edited May 31, 2020 by Anthony.Musgrove Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted May 31, 2020 Share Posted May 31, 2020 And the error states Response Format from the smtp server is wrong, so the encryption method or lack-there-of is probably set incorrectly to what the server encryption method is for that particular port. Are you 100% certain you have the correct encryption type and correct port number for that encryption method on your particular smtp server host? Ie tested that port and that encryption method explicitly in a mail client? Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted May 31, 2020 Share Posted May 31, 2020 By the way, I made a thing. You can use it to debug your email server against the C# SMTP Client (the exact same one Emby Email Notifications uses), actually, the code in my diag tool pretty much mimics the Emby Email notifications code; https://github.com/AnthonyMusgrove/mbSMTPDiag 1 Link to comment Share on other sites More sharing options...
Ninko 63 Posted May 31, 2020 Author Share Posted May 31, 2020 I am definitely sure the details are correct as I use exactly the same for my Synology notifications. Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted May 31, 2020 Share Posted May 31, 2020 I wonder if it is possible that your Synology software has some type of autoselection on encryption method where if it doesn't receive a valid format response it tries another encryption method? Its an interesting one. If you'd like (and are able) add an SMTP user for me for the server and inbox the details to me, and I'll do my own testing for you. Link to comment Share on other sites More sharing options...
Ninko 63 Posted May 31, 2020 Author Share Posted May 31, 2020 How do you mean? Give you full access to the emby server? Link to comment Share on other sites More sharing options...
CBers 6771 Posted May 31, 2020 Share Posted May 31, 2020 20200531_161628.jpg System.Net.Mail.SmtpException: Response format is wrong.(Z) Interesting, looks like an encrypted format like tls or ssl. Maybe using the wrong protocol? FWIW, I also tried using my Virginmedia email address in the Emby Notifications Plugin but it doesn't work. Works fine with my Gmail address, which is weird, as I believe Virginmedia use the same Gmail backbone. Perhaps there is a "Less secure apps access" option somewhere in the VM settings. 1 Link to comment Share on other sites More sharing options...
Ninko 63 Posted May 31, 2020 Author Share Posted May 31, 2020 Yahoo won't work either! Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted June 1, 2020 Share Posted June 1, 2020 Leave this with me I'm going to have a play around with extending the c# SmtpClient. Ill make some improvements and see if Luke wants to pull the changes in. Just at work will look at it tonight 2 Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted June 1, 2020 Share Posted June 1, 2020 (edited) Important We don't recommend that you use the SmtpClient class for new development because SmtpClient doesn't support many modern protocols. Use MailKit or other libraries instead. For more information, see SmtpClient shouldn't be used on GitHub. Theres the issue. So you're more than 100% correct in saying that there is a problem with this plugin, however it is a very simple fix. Im more then happy to rewrite the plugin using mailkit @@Luke if you wish. Ill do it when I get home from work Edited June 1, 2020 by Anthony.Musgrove 2 Link to comment Share on other sites More sharing options...
Ninko 63 Posted June 1, 2020 Author Share Posted June 1, 2020 Thanks @@Anthony.Musgrove it was driving me mad! Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted June 1, 2020 Share Posted June 1, 2020 I've knocked most of it out on my lunch break, but back into the vehicle now for a job. I'll have it finished tonight. smooth sailing. 2 Link to comment Share on other sites More sharing options...
Ninko 63 Posted June 1, 2020 Author Share Posted June 1, 2020 "I've knocked most of it out on my lunch break" You guys are so clever! I've done some coding myself in the past but no where near to that ability. Thanks again 1 Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted June 2, 2020 Share Posted June 2, 2020 (edited) Haha thanks mate. Just working on a couple of dependency issues and it will be done. @@Luke Does the core reference anywhere else to System.Net.Mail before plugins are loaded? Just having issues with the obsolete SmtpClient overriding Mailkit (Re: System.MissingMethodException: Method not found: 'Void MailKit.IMailTransport.Send(MimeKit.MimeMessage, System.Threading.CancellationToken, MailKit.ITransferProgress).) (Ill attach the emby executable to my debugger this afternoon to see if i can get a better view of the situation Edited June 2, 2020 by Anthony.Musgrove Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted June 2, 2020 Share Posted June 2, 2020 Just ran in debugger on my phone, looks like this my issue. Hopefully this afternoon Ill have it resolved Link to comment Share on other sites More sharing options...
Luke 37064 Posted June 2, 2020 Share Posted June 2, 2020 Important We don't recommend that you use the SmtpClient class for new development because SmtpClient doesn't support many modern protocols. Use MailKit or other libraries instead. For more information, see SmtpClient shouldn't be used on GitHub. Theres the issue. So you're more than 100% correct in saying that there is a problem with this plugin, however it is a very simple fix. Im more then happy to rewrite the plugin using mailkit @@Luke if you wish. Ill do it when I get home from work Sounds great, thanks ! 1 Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted June 2, 2020 Share Posted June 2, 2020 Not a problem at all! I've resolved the dependency issues! I'm leaving work now, when I get home I'll be putting it all together and it will be ready <3 <3 so stoked! Link to comment Share on other sites More sharing options...
Anthony Musgrove 195 Posted June 2, 2020 Share Posted June 2, 2020 Okay, all completed and pull request has been created: https://github.com/MediaBrowser/email-notifications/pull/4 Download the DLL here https://github.com/AnthonyMusgrove/email-notifications/blob/master/MediaBrowser.Plugins.SmtpNotifications.dll and copy it to your emby plugins directory. Restart emby, and vwalah. Magic should happen. If anyone has any feedback, bug reports or suggestions please feel free to let me know! warmest regards, Anthony (ps: I've added an 'Ignore SSL Certificate Errors' checkbox on the configuration page (per user), which will allow you to use self-signed email server certificates etc. And if something isn't working, please check your emby server log; a typical 'successful' test/notification log entry set - more then happy to suppress this a little after initial test phases are complete: 2020-06-02 20:47:18.758 Info App: Connecting to smtpserver at mail.newymods.com.au:465 2020-06-02 20:47:18.883 Info App: Authenticating to smtpserver using anthony.musgrove@newymods.com.au/<hidden> 2020-06-02 20:47:21.127 Info App: Sending email anthony.musgrove@newymods.com.au with subject Emby: Emby: Test Notification 2020-06-02 20:47:21.286 Info App: Completed sending email anthony.musgrove@newymods.com.au with subject Emby: Emby: Test Notification Your plugin (if successfully installed manually until it's uploaded to the catalog as an update), you should see the plugin version as 4.0.0.0 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now