Display name at front of sender mail

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

Display name at front of sender mail

Post by pujiarahman »

Hi
iam use following code from phpmaker

function Email_Sending(&$Email, &$Args) {
if (CurrentPageID() == "add") {
$Email->Sender = $Args["rsnew"]["Email"];
$Email->Recipient = $Args["rsnew"]["Emailto"];
$Email->Subject = "My New Subject";
$Email->Format="html";
$Email->Charset="UTF-8";
$Email->Content .= "\nAdded by " . CurrentUserName();
}
return TRUE;
}

The Output from my inbox is

crm@domain.net.id
sent : Wed 9/21/2016 7:07 PM
to : xxx@domain.net.id
cc :

how to add display name at front of sender email like

crm [crm@domain.net.id]
sent : Wed 9/21/2016 7:07 PM
to : xxx@domain.net.id
cc :

Thanks


mobhar
User
Posts: 11712

Post by mobhar »

You may simply use "ew_ExecuteScalar" global function to return the Name of the user based on that known Email.

Please read "Some Global Functions" sub-topic under "Server Events and Client Scripts" topic from PHPMaker Help menu for more information and example how to use it.


pujiarahman
User
Posts: 5
Contact:

Post by pujiarahman »

Thanks, the issue is solved


Post Reply