How to Send and Receive E-Mails Using AVSnap

   Search another tutorials...

AVSnap provides an easy way to send and receive e-mails in run time mode. This function allows the creation of a control program that will send e-mail notifications and execute commands based on the received e-mails.

Step 1: Start AVSnap and switch it to Control mode by selecting 640×480 for the design page resolution. When switched to control mode, AVSnap displays additional tools used for GUI design.

Step 2: Select the E-mail object from the tool bar on the left and place it anywhere on the design page. Once placed on the page, press the “ESC” key to exit e-mail tool.

Step 3: Double click on the e-mail object and fill out all of the parameters for the POP3 account and for the SMTP server account. Adjust the port numbers to match your ISP provider’s requirements. Once everything is filled out, press the “Test” button to check that the connection to the servers was made. Note that the body of the e-mail is not loaded by default since some e-mails may contain a lot of data in the body. The preference is to load only the “subject” and the “from” fields.

Step 4: Now it is time to create a few buttons and text boxes to send and receive e-mail in AVSnap. Sending e-mail is much easier and we will do this first. Create a button called “BtnSendMail” and set the name for the subroutine field “Onclick” to “BtnSendMailClick”. Click on the “Add to Code” tab to create the procedure for the “Send Mail” Button.

Step 5: Press F11 to display program code and enter text as shown below.

Step 6: To receive (or check) e-mail, create a button called “BtnGetMail” with the “OnClick” subroutine field set to “BtnGetMailClick”. In addition, you will need to add a text box, press shortcut “=” and name it “Txt”. Click “Add To code” and press F11 to display the program editor.

Step 7: In the program editor, add the following text to read e-mails from your POP3 account.

Step 8: Now press F9 to run the program and press the Send Mail button and Check Mail button to send and receive your e-mails.

“Send Mail” and “Check Mail” in this article is only for demonstration purpose on showing how AVSnap can send the email to alert designated parties or check mail to take necessary actions. The e-mail notification feature is used in control applications, such as to send e-mail if your projector light bulb is about to expire or send e-mails to yourself, and let AVSnap read the emails from yourself and control your AV System to turn off your lights that you left on. The possible applications for email notifications are endless.

Get Your Free Copy of AVSnap Now

Save Your Time And Effort And Start Using AVSnap To Control Your AV System