Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Wiki Markup
\\  {section}

h4. 

...

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 six arguments are accepted for customizing the contents of the email:

...



{code
:lang
=html
|borderStyle
=solid
}
function send_email ($requesting_page, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6) {

{code}


The variables for primary

...

 contact _$sender _, communications contact _$emp_comm_email _

...

, and URL of host

...

code for
Code Block
langhtml
borderStylesolid
 website _$domain2 _ must be declared within the function:

{code:lang=html|borderStyle=solid}
$sender='kdez@mit.edu';
$emp_comm_email='nadamsx@mit.edu';
$domain2='seagrant.mit.edu';


Code Block
langhtml
title
{code}


{code:lang=html|title=code for system-generated email triggered by successful registration
|borderStyle
=solid
}
//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");
}

{code}

In this example, _$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
* pre-proposal submission

...


* pre-proposal review submission

...


* full proposal submission

...


* full proposal 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