Dahua posted on their 
wiki how to do this. These instructions will work for any 3rd party application / camera, as long as you use the 2-step verification password as opposed to your regular password.
	
	
		
			
			
				
				
				
					
						
							
						
					
					dahuawiki.com
				
 
			 
		 
	 
Step by Step Instructions
1. Log into the web interface of the NVR
Then select 
Setting at the top left
Select 
Network from the drop-down
		
		
	
	
2. Select 
Email from the list on the left
3. Check the box next to 
Enable
Input the following information into these fields:
- SMTP Server: smtp.gmail.com
 
- Port: 587
 
- Username: [Your Gmail email address]
 
- Sender: [Your Gmail email address]
 
4. Open a web browser and log into your Gmail account
Click the Account icon at the top right
Select 
Manage your Google Account
5. Select 
Security from the list on the left
If 2-Step Verification is already setup on your account, you will see it listed as "On". If that is the case, skip to Step 7.
If 2-Step Verification is off, click the arrow to the right of 
2-Step Verification under "Signing in to Google"
6. Select 
Get Started and then follow through all the steps to setup 2-Step Verification for your Gmail account
7. 2-Step Verification should now show "On" under "Signing in to Google"
Select the arrow to the right of 
App passwords
8. Click on 
Select app
Then select 
Mail from the drop-down
9. Click on 
Select device
Then select 
Other (Custom name) from the drop-down
10. Click on the field and type in "Dahua NVR" or another name that will help you associate this password with your NVR
Then select 
Generate
11. You will see a unique password that was generated for use with your NVR
Note this password for use in the next step
12. Go back to your NVR's web interface, where you left off in Step 3
Enter the password that you got from Step 11 in the 
Password field
13. Make sure 
TLS is selected for 
Encryption Type if it is not already
14. Enter the email address you want to send these notifications to next to 
Receiver and then press the 
+ button to the right
(The reciever email address(es) can be the same as the sending address or different)
Repeat this process for all email addresses you want notifications sent to
15. Enter the amount of seconds you want between each email notification in the field next to 
Sending Interval
If you want to recieve emails to verify the email notification system is still working, check the box next to 
Health Mail and enter how often you want those emails in the field next to 
Sending Interval
16. Click 
Apply at the bottom right to save your changes
Press the 
Test button on the bottom left to test notifications with the information you entered above
If the test is successful you will see a message at the top that says "Test succeded" and you will recieve a test email
If it says "Test Failed", check all the information you entered above