February 2015

You are browsing the site archives for February 2015.

All of us have done it: sending a mail without a subject or sending a mail where we wanted to attach something and forgot to attach it.

The following code-snipped can be added to the Visual Basic Editor (Alt-F11) to show a warning if the subject is empty or in the body is the text “attach” or “anhang”.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If Item.Subject = "" Then
        Cancel = MsgBox("There's no subject, send anyway?", vbYesNo + vbExclamation, "No Subject") = vbNo
    End If
 
    If InStr(1, Item.Body, "attach", vbTextCompare) > 0 Or InStr(1, Item.Body, "anhang", vbTextCompare) > 0 Then
        If Item.Attachments.Count = 0 Then
            answer = MsgBox("There's no attachment, send anyway?", vbYesNo)
            If answer = vbNo Then Cancel = True
        End If
    End If
End Sub

Finally I managed to get WOL working the way I wanted it to.
I wanted to use my Diskstation to wake up my pc at home.
For this, the following things needed to be done:

  1. In the BIOS
    1. Advanced -> APM Configuration -> Power On By PCI-E -> Enabled
    2. Advanced -> Network Stack Conf. -> Network Stack -> Enabled
    3. Advanced -> Network Stack Conf. -> Network Stack -> Ipv4/IPv6 -> Enabled
  2. In Windows
    1. Disable the hybrid shutdown mode
      1. In Control Panel, open the Power Options item.
      2. Click the Choose what the power buttons do link.
      3. Clear the Turn on fast startup (recommended) check box (you might need to click “Change settings that are currently unavailable”) first to enable it
      4. Click Save Settings.
    2. Enable Wake-on-Lan by Magic Packet in the Device Manager for your Network Adapter
    3. Install the “Simple TCPIP Services” from the Windows features screen (Not sure if needed)
    4. Open UDP Port 9 in the Windows Firewall
  3. In Diskstation
    1. In Control Panel -> Task Scheduler, create a new task (User-defined script)
    2. Enter a name
    3. Disable it
    4. For DMS Pre-6.0
      1. Enter “ether-wake -i eth0 01:02:03:04:05:06” into the run command (adjust the number according to your network adapter’s MAC)
    5. For DSM after 6.0
      1. Enter “synonet –wake 01:02:03:04:05:06 eth0” into the run command (adjust the number according to your network adapter’s MAC)
    6. Click Ok

That’s it. Now you can connect to your Diskstation from any device, load the admin iterface and go to the task scheduler and run this task once to start your workstation.