Set up motion detection email alerts on your Hikvision camera

Updated and confirmed working with Gmail in May 2022, but please use sendinblue free tier (300 notification emails per day) instead from June 2022!

This tutorial will show you how to set up motion detection email alerts for your Hikvision camera such as the Hikvision DS-2CD2042WD-I. You can use these settings even if you use the camera with an NVR such as the Hikvision DS-7608NI-E2/8N.

A quick note: As an Amazon Associate I earn from qualifying purchases. This post contains affiliate link(s). An affiliate link means I may earn advertising or referral fees if you make a purchase through my link, at no extra cost to you.

Set up motion detection

Using your favourite web browser (I recommend Chrome as it works well with Hikvision), login to your camera using its IP address as the URL. If you haven’t yet changed the username and password, these will be admin and 12345 (change your password ASAP!). Set up your desired motion detection pages in your camera’s web interface.

Turn on email alerts

Next make sure email alerts are turned on in each of your motion detection settings pages (Motion Detection, Video Tampering, Face Detection, Line Crossing Detection or Intrusion Detection) as shown below:

Hikvision Motion Detection Email Alerts Gmail - Basic Event Linkage - VueVille

Set up your camera’s internet connection

Your camera needs some information so that it can connect to the internet and send the email alert out. By default your camera must have figured out all of the fields by itself if you have DHCP enabled, if so leave everything at the default values.

If the setup is not correct and you do not know your IPv4 details, click here.

Hikvision Motion Detection Email Alerts Gmail - Network TCPIP Settings - VueVille

Configure your Gmail account security settings

In this tutorial I am using a Gmail address that the camera will use to send email notifications. However for this to work, you need to enable the ‘Less Secure App Access’ feature.

To do this, first navigate to your Google account settings and click Security on the left menu. By default the ‘Less Secure App Access’ is disabled, but we need it so click on ‘Turn on access’ as shown below.

Hikvision Motion Detection Email Alerts Gmail - Less Secure App Access - VueVille

Then your Gmail account is ready for your Hikvision camera or NVR to login to and send email notifications.

Hikvision Motion Detection Email Alerts Gmail - Less Secure App Access ON - VueVille

Most online guides miss this step above and will lead to frustration as Gmail will not allow your camera to login unless you enable ‘Less Secure App Access’!

Configure your email settings

Next we need to configure the camera as the email ‘sender’- it will use the Gmail account you configured above to send the email alert to a ‘receiver’ account. So the ‘sender’ is the camera and the receiver is the email address(es) that you want to receive the alerts on. Follow the steps below to configure your camera:

Hikvision Motion Detection Email Alerts Gmail - Email Settings - VueVille

Step 1: Click on the configuration tab

Step 2: Under Network, click on ‘Advanced Settings’ (older cameras have a slightly different menu)

Step 3: Choose the email tab

Step 4: Refer to the screenshot above to fill out this section. Enter the login details of your Gmail account – this is the sender account. Enter the ‘receiver’ account details – this is where the email alerts will be received. Tick ‘Attached Image’ if you would like snapshots of the motion detected as well.

Test your settings

Step 5: Click the Test button. You should see the “Testing Succeeded” message and receive a test email at the ‘receiver’ address(es).

Hikvision Motion Detection Email Alerts Gmail - Testing Succeeded - VueVille

If not, you need to ensure that all settings such as TCP/IP and email settings are entered correctly as in the screenshots above.

Save your settings

Finally save your settings by clicking the Save button.

Now test your email alerts by intentionally setting off the motion detection of your camera. You should get an email alert within 60 seconds.


You may occasionally find that you no longer receive alerts. This could be because of two reasons:

  • Issues with sending address – Gmail may switch off the ‘Less secure app access’ feature if your camera never uses it, just turn it on as described earlier if this happens. As a precaution, once in a while test your camera’s email alerts feature to ensure all is well
  • Issues at the receiving end – Most email providers like Gmail may automatically mark the alerts as spam and move these emails to the Junk folder – it will treat the sender address as a suspicious sender due to repeated motion detection email alerts being sent day in and day out. Simply choose the option to treat the ‘sender’ address as a trusted email address and this behaviour should stop.

Get notified when I post new content

Join 131 other VueVille fans! Don't worry, I hate spam too!

Daniel Ross

Daniel Ross

I am Daniel and VueVille is where I document my DIY smart home journey. I focus on 100% local-processing and local-storage because that’s the only way to secure my family’s safety and privacy. Oh and I don’t like monthly subscriptions!

  1. Hello Daniel,
    Thank you very much for your efforts on explaining to us the steps it differently helped. I was wondering if there’s a way to use these settings with a different mail provider. I don’t mind using gmail however I got an email saying they will stop supporting SMTP by the end of May 2022. I tried the setting for Yahoo but didn’t prevail it keeps showing me testing failed. I was hoping to find a solution to this problem or at least a replacement for the gmail when it locks down

  2. On using “GMAIL”…where do I find “Enable StartTLS” option to check?

    • See the section ‘Configure your email settings’ in the article – there is a screenshot showing the ‘Enable StartTLS’ setting, its right below the ’email encryption’ section.

  3. I followed your advice and it helped. Thank you very much

  4. Hello,

    I did exactly as you described. I configured the line crossing detection and the intrusion detection. Works fine with the iVMS-4500 application running at my laptop.

    When I close the laptop it won’t work at all. Does it need iVMS-4500 running? I hope not….

  5. Daniel, thanks, shame. I like the Hikvision because the IR Cube models have integrated PIR, but I also find the picture quality fantastic. I have several Foscams on my network, which I am now replacing with Hikvision cameras for this reason, and because I am in a Mac environment and I have therefore had problems with the fact that Foscam/Amcrest require plugins to be installed each time they are viewed – which is not possible from an iPad or iPhone.

    In the meantime however I have figured how to get the Hikvisions working with PIR detection in Synology Surveillance station – though it is still far from perfect because the SS equivalent of Home and Away mode is full of bugs and works poorly. Vera on the other hand seems remarkably robust and the geofence has so far proven very good. But as yet no way of using the Hikvision PIR sensors as triggers!!

    Great website and resource by the way.

  6. Hi Daniel

    Have you managed to integrate the Hikvision with a Vera unit? Mine works fine with Vera – there are some issues around getting the image address but once the correct text is used it works perfectly – except that I have yet to discover a way on integrating the PIR or other alerts into the Vera, or of arming and disarming the Hikvision cameras from Vera. Any suggestions or tips would be gratefully received as its a bit of a black hole at the moment in terms of setting up a good home surveillance system that can easily be armed and disarmed. The geofence in Vera works excellently so it would be the perfect trigger (as opposed to in my Synology Surveillance station where it is dreadful)


    • Giles, no I have not integrated the Hikvision with the Vera yet. Hikvision seems to want to make it as difficult as possible by not opening up the API their cameras use. The Amcrest cameras on the other hand can be integrated with the Vera and is a great option.

  7. Hello,

    I got the gmail settings to work and it was great for about a day and then it suddenly stopped working, i looked at the spam folder and there was nothing in it. I did some research and someone mentioned that it may be a spf record error. here is the exact quote

    . “your SPF record has “a” record and the “a” record points to a specific IP address that is different from the IP address that you are sending from”

    So if i am understanding this correctly, because my ip camera has an internal dummy address and its sending out through the router ip(gateway) its causing the email to be blocked

    i can still send a test email and receive it but not a alert email.

  8. Mine was working fine until a few weeks ago and I stopped receiving email and I got error “Testing failed” even though I have not changed anything. Any idea what I can do. I am using a GMX.US email.

  9. Firstly thanks for taking the time to write the articles they’ve really helped me setup my Hikvision camera.

    I setup email notifications with my GMail account so followed Robs settings you’d tagged to the end of the article. When I tried to send a test message I got the error “User name or password is wrong”. I eventually remembered I had two-step authentication setup for my GMail account.

    To get around this problem and allow the Hikvision camera to send its notifications, Google allow you to setup something called “App Passwords” This allows access in from applications that do not support the two step authentication process. I setup a special app password for email access and used that in the password authentication field. Now my test email is working! 🙂

  10. I was able to successfully have the camera send to a Gmail (Google Apps) SMTP mail server. The key was to check “Enable StartTLS” (without this enabled the send attempt would fail) and using the following:

    SMTP Server:
    SMTP Port: 587
    Encryption: TLS
    Authentication enabled

  11. I have a DS-7208HGHI-SH firmware v3.1.12 build 160216 and my DVR will not send email either.
    My son has one too and his will not send email either.

  12. Hello!!
    I have a question, i have follow the tutorial step by step. I keep on getting the same error
    “Email test failed! Please check the setting and network status”
    I have a DS-7208HGHI-SH with Firmware version: V.3.3.2 build 151123.
    I am guessing the firmware it is not longer compatible with email settings.
    Is there someone who ones the same brand and model who has the service working at the moment?

    Thanks alot for helping out!

  13. Great writeup.

    One Tip: If you get ‘parameter error’ when you hit ‘Test’, here is the fix–note in the ‘Receiver’ settings, the first field is the name and the SECOND field is the email address. Seems silly and simple, but that simple thing took me an extra five minutes.

  14. Thanks very much for sharing your experience and expertise. My 3-camera HIKVision setup works well with your recommended settings.

  15. hi ,
    i did all things that you say ,
    but i get this notif,
    please enter a valid sender`s address ,

    although i used GMX.

    Thanks ,

  16. Hi,

    I setted up motion detection, to upload snapshot to my FTP and send an email.. The problem is that the CAM is continuously sending email back to back as long as there’s
    movement detected. is there a way to stop it after one or 2 emails has been sent ?


    • Hi Marc,

      As far as we know, there is no way to stop it through a setting. This is because the principle is that the camera triggers an alert whenever one of the motion detection event conditions are met. Using the basic Motion Detection event will send you alerts continuously as long as motion is detected – this is the weakness of this type of event. However depending on the area you are watching, you can use certain events to achieve what you want. For example if you define the entire area under the Intrusion Detection event, it will send you only one alert when a person enters the defined boundary. Also you can set up a Line Crossing event at one of the edges to catch people entering the scene. This works well especially where you have only one entry/exit/access point.


  17. Hello. Idid all the things that you say but i get this mesage below.
    Falied to connect to the test server

    Can you help me please how to fix this. I have Hikvision DVR.

    Thank You.

    • Hi, we have seen this error when using Gmail accounts as the sending account. Can you try a different mail provider? Also make sure you have entered the DNS settings exactly as shown in the screenshots.

  18. I tried to help and also ask for some advice. Yet you just erased my comments and never responded. That’s not right. You are not a very enthusiastic enthusiast.

    • Dear George, we apologise for the delay in approving your comments. Due to an unmanageable amount of spam comments, we have enabled moderation of all comments. There will be a slight delay in approving comments as I have to manually approve all comments. Please be assured that I do not delete comments unless they are abusive or spam. Thank you for your comments and we hope you understand.

  19. I’ve set everything to send the email when motion is detected and it works perfectly except that I do not receive any snap, just a notification subject (Subject: Embedded Net DVR: Motion Detection On Channel A1) and some data on the body regarding the time. I set my own smtp server with poxis on my office fixed ip address. The communication works fine and I am able to send attachments and recive them, except I do not receive any from the DVR (Hikvision 7204). Is there anything I might be missing aside from what is in your post.

  20. Will the ezviz cloud p2p work with a single camera in this configuration?

  21. Do you know of a way to turn this on when leaving the house and turn off when home? Ideally with an android app would be nice.

    • I do not know if this helps you but if you check in the back of the DVR there might be a little green square with holes that have as an objective to recive information from your alarm. I have this setup, your home alarm probably has a PGM port, check the voltage and make sure it matches the DVR. If your DVR has an option of output/input hook the neutral or common of the alarm to the DVR input and close the circuit with your alarm by sending the output PGM to the DVR. Then when you activate your alarm the DVR will send the emails, and stop when you disarm it. I use DSC pc585 but most alarms should have a PGM.

    • Hi thanks for your comment, as far as I know Hikvision official apps such as iVMS4500 do not have this feature. However third party viewer apps such as IPCamViewer and tinyCam Monitor have exactly this feature that you are looking for. From various forums though this looks a bit hit and miss so you will have to just try it and see whether it works for you. I will post a how-to soon for doing this. tinyCAM Monitor is still a great app and is my personal choice.

    Leave a reply

    Compare items
    • Total (0)