Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hallo zusammen,

ich habe heute eine Serverraumüberwachungskit in mit Motion Detector in Betrieb genommen. Den Motion Detector kann man ja leider nicht so schön einfach per Klick ins Nagios einfügen. Daher habe ich flux in C# ein kleines Programm geschrieben, welches bei Bewegung eine Mail verschicken soll. Am Rechner funktioniert es natürlich auch einwandfrei, aber wenn ich das Programm auf den RED-Brick übertrage schlägt der Mailversand fehl. Ich schätze mal, dass das mono mit System.Net.Mail oder den weiteren Befehlen nichts anfangen kann.

 

Hat jemand von euch so etwas schon mal versucht oder gibt es noch eine andere Lösung?

 

Hier mein Code fürs Testen:

 

 
MailMessage mail = new MailMessage();
            mail.From = new MailAddress("MotionDetector@mail.de");
            mail.To.Add("testmail@mail.de"); //Empfänger 
            mail.Subject = "Bewegung im Serverraum";
            mail.Body = string.Format("Um {0} Uhr wurde eine Bewegung im Serverraum erkannt.", DateTime.Now);
            
            SmtpClient client = new SmtpClient("smtp.mail.de", 587);

            try
            {
                client.Credentials = new System.Net.NetworkCredential("testmail@mail.de", "Password");

                client.EnableSsl = true; 

                client.Send(mail);

                Console.WriteLine("E-Mail wurde versendet");
            }
            catch (Exception ex)
            {
                Console.WriteLine("Fehler beim Senden der E-Mail\n\n{0}", ex.Message);
            }
            Console.ReadKey();

 

Gruß und Danke schon mal!

rif

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.