Công cụ thành viên

Công cụ trang web


nukeviet5:codex:hooks-reference:get_email_content_before_send

Đây là một phiên bản cũ của tài liệu!


get_email_content_before_send

Dùng để chỉnh sửa nội dung email trước khi gửi đi trong hàm nv_sendmail_from_template.

Tham số

STT Tên biến Kiểu dữ liệu Ghi chú
0 $email_data array Dữ liệu trong CSDL của mẫu email
1 $row array Dữ liệu truyền vào do người dùng đặt

Dữ liệu trả về

Biến $email_content là nội dung của email.

Ví dụ viết plugin

nv_add_hook($module_name, 'get_email_content_before_send', $priority, function($vars) {
    $email_data = $vars[0];
    $row = $vars[1];
 
    // Thực hiện code hook tại đây...
 
    return $email_content;
});
nukeviet5/codex/hooks-reference/get_email_content_before_send.1565322939.txt.gz · Sửa đổi lần cuối: 2019/08/09 10:55 bởi hoaquynhtim99