Jump to content

Email notifications


Ninko

Recommended Posts

CBers

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.

 

 

Thanks Anthony.

 

I'll give it a try.

  • Like 1
Link to comment
Share on other sites

Anthony Musgrove

Thanks Anthony.

 

I'll give it a try.

You're welcome mate as always, I'd love to know how it goes for your tests :)

Link to comment
Share on other sites

CBers

Using the same configuration as the old version, as getting an error.

2020-06-02 13:13:16.569 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.<>c__DisplayClass8_0.<GetOptions>b__0(SMTPOptions i)
     at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
     at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.GetOptions(User user)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MediaBrowser.Plugins.SmtpNotifications
    TargetSite: Boolean <GetOptions>b__0(MediaBrowser.Plugins.SmtpNotifications.Configuration.SMTPOptions)
    
2020-06-02 13:13:16.613 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    MimeKit.ParseException: MimeKit.ParseException: Invalid addr-spec token at offset 0
     at MimeKit.InternetAddress.TryParseAddrspec(Byte[] text, Int32& index, Int32 endIndex, Byte[] sentinels, Boolean throwOnError, String& addrspec, Int32& at)
     at MimeKit.MailboxAddress.set_Address(String value)
     at MimeKit.MailboxAddress..ctor(Encoding encoding, String name, String address)
     at MimeKit.MailboxAddress..ctor(String name, String address)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MimeKit
    TargetSite: Boolean TryParseAddrspec(Byte[], Int32 ByRef, Int32, Byte[], Boolean, System.String ByRef, Int32 ByRef)
    
Link to comment
Share on other sites

Anthony Musgrove

 

Using the same configuration as the old version, as getting an error.

2020-06-02 13:13:16.569 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.<>c__DisplayClass8_0.<GetOptions>b__0(SMTPOptions i)
     at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
     at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.GetOptions(User user)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MediaBrowser.Plugins.SmtpNotifications
    TargetSite: Boolean <GetOptions>b__0(MediaBrowser.Plugins.SmtpNotifications.Configuration.SMTPOptions)
    
2020-06-02 13:13:16.613 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    MimeKit.ParseException: MimeKit.ParseException: Invalid addr-spec token at offset 0
     at MimeKit.InternetAddress.TryParseAddrspec(Byte[] text, Int32& index, Int32 endIndex, Byte[] sentinels, Boolean throwOnError, String& addrspec, Int32& at)
     at MimeKit.MailboxAddress.set_Address(String value)
     at MimeKit.MailboxAddress..ctor(Encoding encoding, String name, String address)
     at MimeKit.MailboxAddress..ctor(String name, String address)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MimeKit
    TargetSite: Boolean TryParseAddrspec(Byte[], Int32 ByRef, Int32, Byte[], Boolean, System.String ByRef, Int32 ByRef)
    

 

Hmm interesting, can you try editing a configuration value and save the configuration, I have a funny feeling its the extra option I've added, just a single configuration save should update it all

Link to comment
Share on other sites

CBers

Hmm interesting, can you try editing a configuration value and save the configuration, I have a funny feeling its the extra option I've added, just a single configuration save should update it all

 

I already did, but the same error.

2020-06-02 13:20:33.253 Info HttpServer: HTTP GET http://192.168.1.150:8096/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
2020-06-02 13:20:33.254 Info HttpServer: HTTP Response 200 to 192.168.1.42. Time: 1ms. http://192.168.1.150:8096/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 13:20:33.352 Info HttpServer: HTTP POST http://192.168.1.150:8096/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
2020-06-02 13:20:33.353 Info HttpServer: HTTP POST http://192.168.1.150:8096/emby/Notification/SMTP/Test/a08711a48b194896b8cc7961d7d28bae. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
2020-06-02 13:20:33.353 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.<>c__DisplayClass8_0.<GetOptions>b__0(SMTPOptions i)
     at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
     at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.GetOptions(User user)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MediaBrowser.Plugins.SmtpNotifications
    TargetSite: Boolean <GetOptions>b__0(MediaBrowser.Plugins.SmtpNotifications.Configuration.SMTPOptions)
    
2020-06-02 13:20:33.353 Info HttpServer: HTTP Response 500 to 192.168.1.42. Time: 1ms. http://192.168.1.150:8096/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f
2020-06-02 13:20:33.361 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    MimeKit.ParseException: MimeKit.ParseException: Invalid addr-spec token at offset 0
     at MimeKit.InternetAddress.TryParseAddrspec(Byte[] text, Int32& index, Int32 endIndex, Byte[] sentinels, Boolean throwOnError, String& addrspec, Int32& at)
     at MimeKit.MailboxAddress.set_Address(String value)
     at MimeKit.MailboxAddress..ctor(Encoding encoding, String name, String address)
     at MimeKit.MailboxAddress..ctor(String name, String address)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MimeKit
    TargetSite: Boolean TryParseAddrspec(Byte[], Int32 ByRef, Int32, Byte[], Boolean, System.String ByRef, Int32 ByRef)
    
2020-06-02 13:20:33.363 Info HttpServer: HTTP Response 500 to 192.168.1.42. Time: 10ms. http://192.168.1.150:8096/emby/Notification/SMTP/Test/a08711a48b194896b8cc7961d7d28bae
2020-06-02 13:20:39.852 Info HttpServer: HTTP GET http://192.168.1.150:8096/emby/System/Logs/embyserver.txt. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
2020-06-02 13:20:39.864 Info HttpServer: HTTP Response 200 to 192.168.1.42. Time: 12ms. http://192.168.1.150:8096/emby/System/Logs/embyserver.txt
2020-06-02 13:20:40.051 Info HttpServer: HTTP GET http://192.168.1.150:8096/emby/System/Logs/embyserver.txt. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
Link to comment
Share on other sites

Anthony Musgrove

 

I already did, but the same error.

2020-06-02 13:20:33.253 Info HttpServer: HTTP GET http://192.168.1.150:8096/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
2020-06-02 13:20:33.254 Info HttpServer: HTTP Response 200 to 192.168.1.42. Time: 1ms. http://192.168.1.150:8096/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 13:20:33.352 Info HttpServer: HTTP POST http://192.168.1.150:8096/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
2020-06-02 13:20:33.353 Info HttpServer: HTTP POST http://192.168.1.150:8096/emby/Notification/SMTP/Test/a08711a48b194896b8cc7961d7d28bae. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
2020-06-02 13:20:33.353 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.<>c__DisplayClass8_0.<GetOptions>b__0(SMTPOptions i)
     at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
     at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.GetOptions(User user)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MediaBrowser.Plugins.SmtpNotifications
    TargetSite: Boolean <GetOptions>b__0(MediaBrowser.Plugins.SmtpNotifications.Configuration.SMTPOptions)
    
2020-06-02 13:20:33.353 Info HttpServer: HTTP Response 500 to 192.168.1.42. Time: 1ms. http://192.168.1.150:8096/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f
2020-06-02 13:20:33.361 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    MimeKit.ParseException: MimeKit.ParseException: Invalid addr-spec token at offset 0
     at MimeKit.InternetAddress.TryParseAddrspec(Byte[] text, Int32& index, Int32 endIndex, Byte[] sentinels, Boolean throwOnError, String& addrspec, Int32& at)
     at MimeKit.MailboxAddress.set_Address(String value)
     at MimeKit.MailboxAddress..ctor(Encoding encoding, String name, String address)
     at MimeKit.MailboxAddress..ctor(String name, String address)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MimeKit
    TargetSite: Boolean TryParseAddrspec(Byte[], Int32 ByRef, Int32, Byte[], Boolean, System.String ByRef, Int32 ByRef)
    
2020-06-02 13:20:33.363 Info HttpServer: HTTP Response 500 to 192.168.1.42. Time: 10ms. http://192.168.1.150:8096/emby/Notification/SMTP/Test/a08711a48b194896b8cc7961d7d28bae
2020-06-02 13:20:39.852 Info HttpServer: HTTP GET http://192.168.1.150:8096/emby/System/Logs/embyserver.txt. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
2020-06-02 13:20:39.864 Info HttpServer: HTTP Response 200 to 192.168.1.42. Time: 12ms. http://192.168.1.150:8096/emby/System/Logs/embyserver.txt
2020-06-02 13:20:40.051 Info HttpServer: HTTP GET http://192.168.1.150:8096/emby/System/Logs/embyserver.txt. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36

 

Thanks mate, leave this with me!

  • Like 1
Link to comment
Share on other sites

CBers

Still the same, with and without the "Ignore SSL Certificate Errors" option disabled and enabled.

 

2020-06-02 13:45:24.246 Error HttpServer: Error processing request
*** Error Report ***
Version: 4.5.0.12
Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
System.Environment.Version: 3.1.4
Processor count: 4
Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.Plugins.SmtpNotifications.Notifier.GetOptions(User user)
   at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
Source: MediaBrowser.Plugins.SmtpNotifications
TargetSite: MediaBrowser.Plugins.SmtpNotifications.Configuration.SMTPOptions GetOptions(MediaBrowser.Controller.Entities.User)


2020-06-02 13:45:24.247 Info HttpServer: HTTP Response 500 to 192.168.1.23. Time: 85ms. http://192.168.1.150:8988/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f
2020-06-02 13:45:24.291 Error HttpServer: Error processing request
*** Error Report ***
Version: 4.5.0.12
Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
System.Environment.Version: 3.1.4
Processor count: 4
Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
MimeKit.ParseException: MimeKit.ParseException: Invalid addr-spec token at offset 0
   at MimeKit.InternetAddress.TryParseAddrspec(Byte[] text, Int32& index, Int32 endIndex, Byte[] sentinels, Boolean throwOnError, String& addrspec, Int32& at)
   at MimeKit.MailboxAddress.set_Address(String value)
   at MimeKit.MailboxAddress..ctor(Encoding encoding, String name, String address)
   at MimeKit.MailboxAddress..ctor(String name, String address)
   at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
Source: MimeKit
TargetSite: Boolean TryParseAddrspec(Byte[], Int32 ByRef, Int32, Byte[], Boolean, System.String ByRef, Int32 ByRef)


2020-06-02 13:45:24.291 Info HttpServer: HTTP Response 500 to 192.168.1.23. Time: 127ms. http://192.168.1.150:8988/emby/Notification/SMTP/Test/a08711a48b194896b8cc7961d7d28bae
2020-06-02 13:45:27.623 Info HttpServer: HTTP GET http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (Linux; Android 10; Nokia 7 plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.83 Mobile Safari/537.36
2020-06-02 13:45:27.625 Info HttpServer: HTTP Response 200 to 192.168.1.23. Time: 1ms. http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 13:45:27.736 Info HttpServer: HTTP POST http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (Linux; Android 10; Nokia 7 plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.83 Mobile Safari/537.36
2020-06-02 13:45:27.741 Debug XmlSerializer: Serializing to file C:\Users\Media\AppData\Roaming\Emby-Server\plugins\configurations\MediaBrowser.Plugins.SmtpNotifications.xml
2020-06-02 13:45:27.744 Info HttpServer: HTTP Response 204 to 192.168.1.23. Time: 8ms. http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 13:45:29.908 Info HttpServer: HTTP GET http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (Linux; Android 10; Nokia 7 plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.83 Mobile Safari/537.36
2020-06-02 13:45:29.909 Info HttpServer: HTTP Response 200 to 192.168.1.23. Time: 1ms. http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 13:45:29.991 Info HttpServer: HTTP POST http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (Linux; Android 10; Nokia 7 plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.83 Mobile Safari/537.36
2020-06-02 13:45:29.992 Debug XmlSerializer: Serializing to file C:\Users\Media\AppData\Roaming\Emby-Server\plugins\configurations\MediaBrowser.Plugins.SmtpNotifications.xml
2020-06-02 13:45:29.994 Info HttpServer: HTTP Response 204 to 192.168.1.23. Time: 3ms. http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 13:45:31.052 Info HttpServer: HTTP GET http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (Linux; Android 10; Nokia 7 plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.83 Mobile Safari/537.36
2020-06-02 13:45:31.053 Info HttpServer: HTTP Response 200 to 192.168.1.23. Time: 1ms. http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 13:45:31.142 Info HttpServer: HTTP POST http://192.168.1.150:8988/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f. UserAgent: Mozilla/5.0 (Linux; Android 10; Nokia 7 plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.83 Mobile Safari/537.36
2020-06-02 13:45:31.143 Error HttpServer: Error processing request
*** Error Report ***
Version: 4.5.0.12
Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
System.Environment.Version: 3.1.4
Processor count: 4
Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.Plugins.SmtpNotifications.Notifier.GetOptions(User user)
   at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
Source: MediaBrowser.Plugins.SmtpNotifications
TargetSite: MediaBrowser.Plugins.SmtpNotifications.Configuration.SMTPOptions GetOptions(MediaBrowser.Controller.Entities.User)


2020-06-02 13:45:31.144 Info HttpServer: HTTP Response 500 to 192.168.1.23. Time: 2ms. http://192.168.1.150:8988/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f
2020-06-02 13:45:31.144 Info HttpServer: HTTP POST http://192.168.1.150:8988/emby/Notification/SMTP/Test/a08711a48b194896b8cc7961d7d28bae. UserAgent: Mozilla/5.0 (Linux; Android 10; Nokia 7 plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.83 Mobile Safari/537.36
2020-06-02 13:45:31.151 Error HttpServer: Error processing request
*** Error Report ***
Version: 4.5.0.12
Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
System.Environment.Version: 3.1.4
Processor count: 4
Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
MimeKit.ParseException: MimeKit.ParseException: Invalid addr-spec token at offset 0
   at MimeKit.InternetAddress.TryParseAddrspec(Byte[] text, Int32& index, Int32 endIndex, Byte[] sentinels, Boolean throwOnError, String& addrspec, Int32& at)
   at MimeKit.MailboxAddress.set_Address(String value)
   at MimeKit.MailboxAddress..ctor(Encoding encoding, String name, String address)
   at MimeKit.MailboxAddress..ctor(String name, String address)
   at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
Source: MimeKit
TargetSite: Boolean TryParseAddrspec(Byte[], Int32 ByRef, Int32, Byte[], Boolean, System.String ByRef, Int32 ByRef)


2020-06-02 13:45:31.152 Info HttpServer: HTTP Response 500 to 192.168.1.23. Time: 8ms. http://192.168.1.150:8988/emby/Notification/SMTP/Test/a08711a48b194896b8cc7961d7d28bae

I do have multiple users on my server and I am only selecting to send from one, if that makes any difference,

 

 

Link to comment
Share on other sites

Anthony Musgrove

Thank you mate, I've uploaded 4.0.0.2: https://github.com/AnthonyMusgrove/email-notifications/blob/master/MediaBrowser.Plugins.SmtpNotifications.dll

 

It will give us some debug.  It's just having an issue creating a new MailBoxAddress() object for either the EmailTo or EmailFrom field in your config :)

 

Thank you so much mate!

  • Like 1
Link to comment
Share on other sites

Anthony Musgrove

From MailKit/MimeKit's developers:

 

This just means that the "email address" in one of the TNEF fields is not a valid email address (syntactically).

It might just be that the address type field was not "SMTP" and MimeKit tried to parse it as if it were a rfc822 address field.

  • Like 1
Link to comment
Share on other sites

Anthony Musgrove

We will figure it out mate.  It may be an invalid value in your config.

 

It's working flawlessly on three of my servers, all different OS's and using IgnoreCertificateErrors (because my mail server uses a self signed certificate) :)

 

5ed64fab28f92_notifications.png

  • Like 1
Link to comment
Share on other sites

CBers

With and without the option on.

Chrome/83.0.4103.77 Safari/537.36
2020-06-02 14:13:08.025 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.GetOptions(User user)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MediaBrowser.Plugins.SmtpNotifications
    TargetSite: MediaBrowser.Plugins.SmtpNotifications.Configuration.SMTPOptions GetOptions(MediaBrowser.Controller.Entities.User)
    
2020-06-02 14:13:08.026 Info HttpServer: HTTP Response 500 to 192.168.1.19. Time: 86ms. http://192.168.1.150:8988/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f
2020-06-02 14:13:08.070 Error App: Error creating Mailbox Address objects for from:"Emby" <sender@gmail.com> or to:recipient@gmail.com (error: Invalid addr-spec token at offset 0)
2020-06-02 14:13:08.091 Info App: Connecting to smtpserver at smtp.gmail.com:587
2020-06-02 14:13:08.315 Error App: Error sending email: MailKit.Security.SslHandshakeException: An error occurred while attempting to establish an SSL or TLS connection.

This usually means that the SSL certificate presented by the server is not trusted by the system for one or more of
the following reasons:

1. The server is using a self-signed certificate which cannot be verified.
2. The local system is missing a Root or Intermediate certificate needed to verify the server's certificate.
3. A Certificate Authority CRL server for one or more of the certificates in the chain is temporarily unavailable.
4. The certificate presented by the server is expired or invalid.

Another possibility is that you are trying to connect to a port which does not support SSL/TLS.

It is also possible that the set of SSL/TLS protocols supported by the client and server do not match.

See https://github.com/jstedfast/MailKit/blob/master/FAQ.md#SslHandshakeException for possible solutions.

---> System.IO.IOException: The handshake failed due to an unexpected packet format.
at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Security.SslStream.ThrowIfExceptional()
at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__64_2(IAsyncResult iar)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken)
at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
2020-06-02 14:13:08.315 Info HttpServer: HTTP Response 204 to 192.168.1.19. Time: 375ms. http://192.168.1.150:8988/emby/Notification/SMTP/Test/a08711a48b194896b8cc7961d7d28bae
2020-06-02 14:13:12.454 Info HttpServer: HTTP GET http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (X11; CrOS x86_64 13020.54.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.77 Safari/537.36
2020-06-02 14:13:12.455 Info HttpServer: HTTP Response 200 to 192.168.1.19. Time: 1ms. http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 14:13:12.490 Info HttpServer: HTTP POST http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (X11; CrOS x86_64 13020.54.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.77 Safari/537.36
2020-06-02 14:13:12.492 Debug XmlSerializer: Serializing to file C:\Users\Media\AppData\Roaming\Emby-Server\plugins\configurations\MediaBrowser.Plugins.SmtpNotifications.xml
2020-06-02 14:13:12.494 Info HttpServer: HTTP Response 204 to 192.168.1.19. Time: 4ms. http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 14:13:14.289 Info HttpServer: HTTP GET http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration. UserAgent: Mozilla/5.0 (X11; CrOS x86_64 13020.54.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.77 Safari/537.36
2020-06-02 14:13:14.291 Info HttpServer: HTTP Response 200 to 192.168.1.19. Time: 1ms. http://192.168.1.150:8988/emby/Plugins/b9f0c474-e9a8-4292-ae41-eb3c1542f4cd/Configuration
2020-06-02 14:13:14.334 Info HttpServer: HTTP POST http://192.168.1.150:8988/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f. UserAgent: Mozilla/5.0 (X11; CrOS x86_64 13020.54.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.77 Safari/537.36
2020-06-02 14:13:14.335 Info HttpServer: HTTP POST http://192.168.1.150:8988/emby/Notification/SMTP/Test/a08711a48b194896b8cc7961d7d28bae. UserAgent: Mozilla/5.0 (X11; CrOS x86_64 13020.54.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.77 Safari/537.36
2020-06-02 14:13:14.336 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.5.0.12
    Command line: C:\Users\Media\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
    Operating system: Microsoft Windows NT 6.2.9200.0
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Media/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.4
    Processor count: 4
    Program data path: C:\Users\Media\AppData\Roaming\Emby-Server
    Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\system
    System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.GetOptions(User user)
     at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
    Source: MediaBrowser.Plugins.SmtpNotifications
    TargetSite: MediaBrowser.Plugins.SmtpNotifications.Configuration.SMTPOptions GetOptions(MediaBrowser.Controller.Entities.User)
    
2020-06-02 14:13:14.336 Info HttpServer: HTTP Response 500 to 192.168.1.19. Time: 2ms. http://192.168.1.150:8988/emby/Notification/SMTP/Test/9eac53d92edd448196cd69a41d3cb18f
2020-06-02 14:13:14.343 Error App: Error creating Mailbox Address objects for from:"Emby" <sender@gmail.com> or to:recipient@gmail.com (error: Invalid addr-spec token at offset 0)
2020-06-02 14:13:14.350 Info App: Connecting to smtpserver at smtp.gmail.com:587
2020-06-02 14:13:14.475 Error App: Error sending email: MailKit.Security.SslHandshakeException: An error occurred while attempting to establish an SSL or TLS connection.

This usually means that the SSL certificate presented by the server is not trusted by the system for one or more of
the following reasons:

1. The server is using a self-signed certificate which cannot be verified.
2. The local system is missing a Root or Intermediate certificate needed to verify the server's certificate.
3. A Certificate Authority CRL server for one or more of the certificates in the chain is temporarily unavailable.
4. The certificate presented by the server is expired or invalid.

Another possibility is that you are trying to connect to a port which does not support SSL/TLS.

It is also possible that the set of SSL/TLS protocols supported by the client and server do not match.

See https://github.com/jstedfast/MailKit/blob/master/FAQ.md#SslHandshakeException for possible solutions.

---> System.IO.IOException: The handshake failed due to an unexpected packet format.
at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Security.SslStream.ThrowIfExceptional()
at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__64_2(IAsyncResult iar)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken)
at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
Link to comment
Share on other sites

Anthony Musgrove

Thankyou mate, I'll do some testing with my gmail information and see if theres an issue there :)

  • Like 1
Link to comment
Share on other sites

CBers

Thankyou mate, I'll do some testing with my gmail information and see if theres an issue there :)

OK, thanks for your help. I know it's getting late over there, so no rush. I'll put the old DLL back in place for now.

  • Like 1
Link to comment
Share on other sites

Anthony Musgrove

2020-06-02 23:28:22.466 Info App: Connecting to smtpserver at smtp.gmail.com:465
2020-06-02 23:28:23.223 Info App: Authenticating to smtpserver using anthony.musgrove.emby@gmail.com/<hidden>
2020-06-02 23:28:23.634 Info App: Sending email anthony.musgrove.emby@gmail.com with subject Emby: Emby: Test Notification
2020-06-02 23:28:25.381 Info App: Completed sending email anthony.musgrove.emby@gmail.com with subject Emby: Emby: Test Notification

 

Hmm.. works fine with gmail here.  I had to turn on use less secure apps, but it worked with port 465 ssl

  • Like 1
Link to comment
Share on other sites

Anthony Musgrove

I'm wondering, if you renamed the existing configuration file or moved it out of that folder, let the plugin create a new configuration file from scratch, would it work then I wonder... :)

 

thanks so much

  • Like 1
Link to comment
Share on other sites

CBers

2020-06-02 23:28:22.466 Info App: Connecting to smtpserver at smtp.gmail.com:465

2020-06-02 23:28:23.223 Info App: Authenticating to smtpserver using anthony.musgrove.emby@gmail.com/<hidden>

2020-06-02 23:28:23.634 Info App: Sending email anthony.musgrove.emby@gmail.com with subject Emby: Emby: Test Notification

2020-06-02 23:28:25.381 Info App: Completed sending email anthony.musgrove.emby@gmail.com with subject Emby: Emby: Test Notification

 

Hmm.. works fine with gmail here.  I had to turn on use less secure apps, but it worked with port 465 ssl

 

Just tried port 465 (have had ir working via 587 for years), and got this in the server log.

2020-06-02 14:29:40.795 Info App: Connecting to smtpserver at smtp.gmail.com:465
2020-06-02 14:29:41.616 Info App: Authenticating to smtpserver using sender@gmail.com/<hidden>
2020-06-02 14:29:41.937 Info App: Sending email recipient@gmail.com with subject Emby: Emby: Test Notification
2020-06-02 14:29:41.940 Error App: Error sending email: System.InvalidOperationException: No sender has been specified.
   at MailKit.Net.Smtp.SmtpClient.SendAsync(FormatOptions options, MimeMessage message, CancellationToken cancellationToken, ITransferProgress progress)
   at MailKit.MailTransport.SendAsync(MimeMessage message, CancellationToken cancellationToken, ITransferProgress progress)
   at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(UserNotification request, CancellationToken cancellationToken)
Link to comment
Share on other sites

Anthony Musgrove

Hrm, could you send me privately a copy of the new config it created, and the entire emby server log :) 

 

thanks heaps, then I promise I'll stop bugging you for a while hehe :)

  • Like 1
Link to comment
Share on other sites

Anthony Musgrove

Thats interesting that it has no sender information, I'd love to see the whole log but :)

  • Like 1
Link to comment
Share on other sites

CBers

Contents of the config file.

 

<?xml version="1.0"?>
<PluginConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Options>
    <SMTPOptions>
      <Enabled>true</Enabled>
      <EmailFrom>"Emby" <sender@gmail.com></EmailFrom>
      <EmailTo>recipient@gmail.com</EmailTo>
      <Server>smtp.gmail.com</Server>
      <Port>465</Port>
      <UseCredentials>true</UseCredentials>
      <Username>sender@gmail.com</Username>
      <Password>password</Password>
      <MediaBrowserUserId>hidden</MediaBrowserUserId>
      <SSL>true</SSL>
      <IgnoreCertificateErrors>true</IgnoreCertificateErrors>
    </SMTPOptions>
  </Options>
</PluginConfiguration>
Link to comment
Share on other sites

CBers

Hrm, could you send me privately a copy of the new config it created, and the entire emby server log :)

 

thanks heaps, then I promise I'll stop bugging you for a while hehe :)

 

Bug away :D

 

I'll send you via PM, or do you want them via EMAIL ??

Link to comment
Share on other sites

Anthony Musgrove

Hehe thanks mate :)))

 

Email is fine, anthony.musgrove@newymods.com.au will reach me :)

 

 

FOUND your issue!!!!!!

 

The from email has to be a plain email without the From name specified.  ahh thats the issue.   I can add a 'From Name' field if you like.

 

But just have email@address.here without the "Emby" and < and >

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...