Add BCC to send mail

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
abstract
User
Posts: 15
Location: India
Contact:

Add BCC to send mail

Post by abstract »

I am sending emails on update to the email ids stored in database. I want to have a copy of the each and every mail to be sent to the admin email id. How can I add BCC to the email sending option. Here is my code to get the dynamic email stored in the database. I am able to send the email successfully to these ids.


// Email Sending event
function Email_Sending(&$Email, &$Args) {
//var_dump($Email); var_dump($Args); exit();
if($Args["rsold"]["ScholarshipStatus"]!=$Args["rsnew"]["ScholarshipStatus"]){
$Email->Subject="Update regarding your Scholarship submitted at Website";

$Email->Recipient=ew_ExecuteScalar("SELECT studentlogins.email FROM studentlogins INNER JOIN scholarshipdetails ON studentlogins.StudentID = scholarshipdetails.StudentID WHERE studentlogins.StudentID =".$Args["rsnew"]["StudentID"]);

Can anyone guide me how and where I add the code?


mobhar
User
Posts: 11703

Post by mobhar »

Simply add the following code into "Email_Sending" server event:

$Email->Bcc = "xyz@something.com";


Post Reply