Section |
---|
Wiki Markup |
{html}
<TABLE border="0" cellpadding="0" cellspacing="8" mce_style="margin:0;" style="margin:0;" width="100%">
<TBODY>
<TR valign="top">
<TD align="left" width="45%"><B>variable</B></TD>
<TD align="left" width="55%"><B>description</B></TD>
</TR>
</TBODY></TABLE>
{html} |
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 determines which email is sent, and up to four arguments are accepted for customizing the contents of the email:
Code Block |
---|
lang | html |
---|
title | code system-generated email triggered by successful registration |
---|
borderStyle | solid |
---|
|
function send_email ($requesting_page, $arg1, $arg2, $arg3, $arg4) {
|
The variables for primary contact, Communications contact, and URL of host website must be declared within the function:
Code Block |
---|
lang | html |
---|
title | code system-generated email triggered by successful registration |
---|
borderStyle | solid |
---|
|
$sender='kdez@mit.edu';
$emp_comm_email='nadamsx@mit.edu';
$domain2='seagrant.mit.edu';
|
Code Block |
---|
lang | html |
---|
title | code 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");
}
|