,

Testing Inbound Emails from Applicants

Now that you have written your Apex handler and created an Email Service to receive the emails, you are ready to test your new functionality.

As part of the setup for this chapter, a Visualforce page and controller was added to your organization to render a list of available positions with appropriate email hyperlinks for applicants to click on. To navigate to the page as shown below, enter /apex/availablepositions after the instance part of the URL in your browser, for example http://c.emea.visualforce.com/apex/availablepositions.

Figure 203. Visualforce page to send an email


1.
Bring up the Visualforce page shown above in your browser.

2.
Click the Apply link for a given Job Description to open your email client. Note that the hyperlinks have prefilled the email recipient and subject line for the user, as well as the phone number of the current user.

3.
Complete the rest of the email with an appropriate message, such as the one shown earlier in this chapter..

4.
Attach a file to the message and send it.

If your Apex class works properly, the email address you used to send the message receives an automated confirmation email that your job application has been received and processed. This response email is sent using the Apex Outbound Email API, covered in the next section.

Caution

Was the incoming application accepted, or was an error reported? If the position that was receiving the application had the requirement to reject undereducated applicants, indicated with a checkbox, the incoming application may have been rejected for this reason. This rejection is good news, since it indicates that the validations are still enforced, even for applications made through the email handling service.

5.
Use the Candidates and Job Applications tabs to look for the new records.

Caution

The code in the AvailablePositionsController Apex class used as the controller for this page has automatically read the first email address from the Email Service, named ProcessApplicant. For this page to work properly, you must have completed all the steps earlier in this chapter to setup this specific Email Service with the name of ProcessApplicant.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.173.78