Removing "Record Status Changed" from Email_Sending function

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
vesser
User
Posts: 5

Removing "Record Status Changed" from Email_Sending function

Post by vesser »

Hello everyone, thinking that this one might be an easy one.

When using the Email_Sending function, when receiving the email from the function at the top of the email I get something like this:

=============
Record status changed as follows:
Table: TABLENAME
Key value: 74
Action: Inserted

// Email information then is correct from the below.

I'd like to eliminate the top part on the table and key value.

Thanks in advance. Here is a version of my code:

// Email Sending event
function Email_Sending(&$Email, &$Args) {
//var_dump($Email); var_dump($Args); exit();

if (CurrentPageID() == "add") { // If Add page
$Email->Recipient = "USER@domain.com"; // Change recipient to a field value in the new record
$Email->Subject = "[ID is : " . $Args["rsnew"]["internal_ID"]."] Project added" ; // Change subject 

//$Email->Subject = "Giving this a subject"; // Change subject

$Email->Content .= "<BR><BR><BR><table border='1'>
<tbody>
<tr>
<td><b>Engineer name(s)</b></td>
<td>:</td>
<td>". $Args["rsnew"]["username_email"]."</td>
</tr>

<tr>
<td><b>Description</b></td>
<td>:</td>
<td>". $Args["rsnew"]["task_name"]."</td>
</tr>

<tr>
<td><b>Region</b></td>
<td>:</td>
<td>". $Args["rsnew"]["region"]."</td>
</tr>

<tr>
<td><b>requester</b></td>
<td>:</td>
<td>". $Args["rsnew"]["requester"]."</td>
</tr>

<tr>
<td><b>priority</b></td>
<td>:</td>
<td>". $Args["rsnew"]["priority"]."</td>
</tr>

</tbody>
</table>";
}
return TRUE;
}

I'd get something in email that looks like this:

Record status changed as follows:
From:Server
To: User

Table: bla_table
Key value: 74
Action: Inserted

Engineer name(s): bla
Description: Test
Region: _Global
requester: email@bla.com
priority: Normal

Thanks in advance everyone.


mobhar
User
Posts: 11702

Post by mobhar »

Simply change this code:
$Email->Content .= "<BR><BR><BR><table border='1'>

to (remove dot before the "=" sign):
$Email->Content = "<BR><BR><BR><table border='1'>


vesser
User
Posts: 5

Post by vesser »

Thank you that was perfect! Details Details..


Post Reply