Working …
This value you provided is not a number. Please try again.
This value you provided is not an integer. Please try again.
The value entered is not a valid Vanderbilt Medical Record Number (i.e. 4- to 9-digit number, excluding leading zeros). Please try again.
The value you provided must be within the suggested range
The value you provided is outside the suggested range
This value is admissible, but you may wish to double check it.
The value entered must be a time value in the following format HH:MM within the range 00:00-23:59 (e.g., 04:32 or 23:19).
This field must be a 5 or 9 digit U.S. ZIP Code (like 94043). Please re-enter it now.
This field must be a 10 digit U.S. phone number (like 415 555 1212). Please re-enter it now.
This field must be a valid email address (like joe@user.com). Please re-enter it now.
The value you provided could not be validated because it does not follow the expected format. Please try again.
Required format:
REDCap Logo
Plugins, Hooks, & External Modules
Developer methods for
Plugins, Hooks, & External Modules
Hook functions

REDCap Developer Tools:
Documentation for Plugins, Hooks, & External Modules

REDCap Version 14.9.1
REDCap::getParticipantEmail
(REDCap >= 5.11.0)
REDCap::getParticipantEmail — Obtains a survey participant's email address using the record name to which it belongs (assumes the record already exists)
Description
string REDCap::getParticipantEmail ( string $record [, string $instrument = NULL ] )
Obtains a survey participant's email address using the record name to which it belongs (assumes the record already exists). This method will first check if there exists an email address entered into the Participant List of the first survey instrument, and if not, it will then retrieve the value of the designated email field for the record (if the designated email field option has been enabled on the Project Setup page). If the survey-specific email invitation field is set for a given survey on the Survey Settings page, then you must additionally pass the unique instrument name so that it will return the email address for that specific survey.
Parameters
record
The name of the record/response to which the participant's email address belongs.
instrument
(optional) The name of the data collection instrument (i.e., the unique name, not the instrument label) to which this survey corresponds. This corresponds to the value of Column B in the Data Dictionary. NOTE: This parameter only needs to be passed when utilizing the survey-specific email invitation field for a given survey, in which there might exist a different email address for that specific survey than for other surveys in the project.
Return Values
Returns the survey participant's email address if exists, else it returns NULL.
Restrictions
This method can ONLY be used in a project context (i.e. when "pid" parameter is in the query string of the plugin URL) or else a fatal error is produced.
Examples
Example #1:
This example illustrates how obtain the email address for a particular participant record.
// We have our record name
$record = '101';

// Get the email address of this participant record
$email_address = REDCap::getParticipantEmail($record);
REDCap 14.9.1 - © 2024 Vanderbilt University