Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

 

System-generated emails are utilized by the web interfaces to automatically send emails to users for a variety of reasons, and include personalized information.  Each requires further configuration by the adopting SG program. A complete list of eSeaGrant system-generated emails is included below.

This is a different set of emails than what is sent via the FMP interfaces.

 

Configuring System-Generated Emails

Refer to section labeled "System-Generated Emails" in config.php
 

1.  Assign program-specific values for the following variables (examples shown) :

Code Block
borderStylesolid
langhtml
$sender='kdez@mit.edu'; sender email address
$emp_comm_email='nadamsx@mit.edu'; Communications contact email address
$domain2='seagrant.mit.edu'; SG website URL 


2. Configure email text and arguments

System-generated emails are triggered by a requesting page, and incorporate up to six values provided by the page for inclusion in the email.

Code Block
borderStylesolid
langhtml

...

send_mail function

The send_mail function is called by a webpage as a result of a successful transaction requiring confirmation, such as registration to begin using the system.

The $requesting_page variable tells the function which email to send, and up to four arguments are accepted for customizing the contents of the email:

Code Block
langhtml
borderStylesolid

function send_email ($requesting_page, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6) {

The variables for primary contact $sender , communications contact $emp_comm_email , and URL of host website $domain2  must be declared within the function:

Code Block
langhtml
borderStylesolid

$sender='kdez@mit.edu';
$emp_comm_email='nadamsx@mit.edu';
$domain2='seagrant.mit.edu';

The above code is embedded in the requesting page. The $requesting_page variable tells the function which email to send, and up to six arguments ($arg1, $arg2, $arg3, $arg4, $arg5, $arg6) are accepted for customizing the contents of the email


In the following example of an actual email, the requesting page is 'register.php', $arg1 is the registrant's email address, $arg2 and $arg3 are the recipients first and last name, and $arg4 is the recipient's password.  The embedded code in the requesting page that triggers the email should match the contents of the email code (i.e. arguments declared in the requesting code should be the same arguments needed in the actual email code).

Code Block
Code Block
langhtml
titlecode for system-generated email triggered by successful registration
borderStylesolid
langhtml

//register
if ($requesting_page=='register.php') {

mail ("$arg1", "MIT Sea Grant Online Proposal Submission Registration",
"
You have successfully registered for MIT Sea Grant Online Proposal Submission.\n
Please use the information provided below to log-in and begin the Preliminary Proposal phase of the submission process.\n
URL : [https://$domain2/RFP/proposals/cpanel_login.php\n]
PI First Name : $arg2\n
PI Last Name : $arg3\n
Password: $arg4","From: $sender\r\nCc: $sender");
}

In this case, $arg1 is the registrant's email address, $arg2 and $arg3 are the recipients first and last name, and $arg4 is the recipient's password. 

List of Included System-Generated Emails

  • registration
  • start new proposal
  • submit pre-proposal submission
  • submit application
  • submit pre-proposal review submissionreviews
  • submit full proposal submissionfull proposal
  • submit peer review submission
  • full proposal peer review rebuttal submission
  • full proposal panel review submission
  • report submission
  • reviewer password retrieval
  • reporting PI password retrieval
  • proposal PI password retrieval
  • reviews
  • submit rebuttals
  • submit panel reviews
  • submit report
  • reviewer retrieve password
  • project-reporting PI retrieve password
  • proposal-submitting PI retrieve password