diff options
author | prashant | 2015-11-04 18:10:42 +0530 |
---|---|---|
committer | prashant | 2015-11-04 18:10:42 +0530 |
commit | bd61ca0bae497fef876a3b8c716e70919e651474 (patch) | |
tree | ce2c3041afda690d0f7ea29af3e4ae9cd4925d2b /upload_code_delete.inc | |
parent | cf4aee0e5675851843062a070ed67b3194ddd7cf (diff) | |
download | DWSIM_lab_migration_module-bd61ca0bae497fef876a3b8c716e70919e651474.tar.gz DWSIM_lab_migration_module-bd61ca0bae497fef876a3b8c716e70919e651474.tar.bz2 DWSIM_lab_migration_module-bd61ca0bae497fef876a3b8c716e70919e651474.zip |
mail function modifed and formated the code
Diffstat (limited to 'upload_code_delete.inc')
-rwxr-xr-x | upload_code_delete.inc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/upload_code_delete.inc b/upload_code_delete.inc index 204ac4a..25059eb 100755 --- a/upload_code_delete.inc +++ b/upload_code_delete.inc @@ -68,21 +68,31 @@ function lab_migration_upload_code_delete() drupal_set_message('Solution deleted.', 'status'); /* sending email */ - $email_to = $user->mail . ', ' . variable_get('lab_migration_emails', ''); + $email_to = $user->mail; + + $from = variable_get('lab_migration_from_email', ''); + $bcc= variable_get('lab_migration_emails', ''); + $cc=variable_get('lab_migration_cc_emails', ''); + $param['solution_deleted_user']['lab_title'] = $proposal_data->lab_title; $param['solution_deleted_user']['experiment_title'] = $experiment_data->title; $param['solution_deleted_user']['solution_number'] = $solution_data->code_number; $param['solution_deleted_user']['solution_caption'] = $solution_data->caption; - $param['example_deleted_user']['user_id'] = $user->uid; + $param['solution_deleted_user']['user_id'] = $user->uid; + $param['solution_deleted_user']['headers']=array('From'=>$from,'MIME-Version'=> '1.0', + 'Content-Type'=> 'text/plain; charset=UTF-8; format=flowed; delsp=yes', + 'Content-Transfer-Encoding' => '8Bit', + 'X-Mailer'=> 'Drupal','Cc' => $cc, 'Bcc' => $bcc); - if (!drupal_mail('lab_migration', 'solution_deleted_user', $email_to, language_default(), $param, variable_get('lab_migration_from_email', NULL), TRUE)) + if (!drupal_mail('lab_migration', 'solution_deleted_user', $email_to, language_default(), $param , $from , TRUE)) drupal_set_message('Error sending email message.', 'error'); } else { drupal_set_message('Error deleting example.', 'status'); } - drupal_goto('lab-migration/code'); + drupal_goto('lab_migration/code'); return; } + ?> |