E-Mail Functions : Function Index

Description : E-Mail functions will be useful to fetch and check the mail properties, if the application send a mail.

Where to use E-Mail Functions can be used ?

Following is the scenario where E-Mail Functions can be used,
How to insert E-Mail Functions in the script ?
Following are the various functions available in the E-Mail Functions,
  1. checkMailProperty
  2. fetchMails
  3. getMailCount
  4. getMailProperty


checkMailProperty

 Function Description:

 Use this function to check the mail property.

 How to Define:

	checkMailProperty("<Property_to_check>","<Condition>","<value_of_the_property>",<index_of_the_mail>,"<property_to_check>","<condition>","<Value_of_the_property>",<time_out>)

 Example:

                
fetchMails("pop","user1","user1",110)

                result = checkMailProperty("To","equals","qengine-support@adv.com",1,"Subject","contains","Support",10)

                In the above case, the mails will be fetched from the "pop" mail incoming server , from the account user1. Then the obtained mails will be validated for the given property.

 Return Values:

                0 - For Success
                1 - For Failed
Top

fetchMails

Function Description:

 Use this function to fetch the mails from the incoming server from the given user account

 How to Define:

          fetchMails("<Incoming_mail_server>","<user_account>","<password_of_account>","<mail_server_port>","<Delete_Mails_After_Fetching>")

Example:

                
fetchMails("pop","user1","user1",110,"true")

                In the above case, the mails will be fetched from the "pop" mail incoming server, from the account user1. If the last parameter set to true, then the mails will be deleted in the mail server.

Return Values:

                Void
Top

getMailCount

Function Description:

 Use this function to fetch the mails from the incoming server and get the number of mails received for the account matching given property.

 How to Define:

                getMailCount("<Mail_Property>","<condition>","<property_value>","<time_out")

Example:

                
fetchMails("pop","user1","user1",110)               
               
result = getMailCount("From","equals","qengine@adventnet.com",10)

                In the above case, the mails will be fetched from the "pop" mail incoming server, from the account user1 and then mail matching the given property will be counted and returned.

Return Values:

                Integer - number of mail matching the given property
Top

getMailProperty

Function Description: 
       
                Use this function to fetch the mails from the incoming server and get the specific mail property of the mail received.

How to Define:

                getMailProperty("<mail_property_to_match>","<condition>","<property_value>","<property_to_get>","<index_of_the_mail>","<time_out>")

Example:


                
fetchMails("pop","user1","user1",110)               
               
result = getMailProperty("From","equals","qengine@adventnet.com","Subject","1"10)

                In the above case, the mails will be fetched from the "pop" mail incoming server, and the mail property of the matching mail  will be taken.

Return Values:

             String -  Mail property of the fetched  mail.

Top

 



Copyright © 1999, AdventNet Inc. All Rights Reserved.