Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion wp-graphql-send-mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function wpgraphql_send_mail_cc_render()
{
$options = get_option('wpgraphql_send_mail_settings');
?>
<input type="email" name='wpgraphql_send_mail_settings[wpgraphql_send_mail_cc]' value="<?php echo isset($options['wpgraphql_send_mail_cc']) ? trim($options['wpgraphql_send_mail_cc']) : ''; ?>" />
<textarea rows="6" name='wpgraphql_send_mail_settings[wpgraphql_send_mail_cc]'><?php echo isset($options['wpgraphql_send_mail_cc']) ? trim($options['wpgraphql_send_mail_cc']) : ''; ?></textarea>
<?php
}
function wpgraphql_send_mail_to_render()
Expand Down Expand Up @@ -136,6 +136,10 @@ function wpgraphql_send_mail_options_page()
'type' => 'String',
'description' => __('Who to send the email to', 'wp-graphql-send-mail'),
],
'cc' => [
'type' => 'String',
'description' => __('Add carbon copy for secondary recipient.', 'wp-graphql-send-mail'),
],
'from' => [
'type' => 'String',
'description' => __('Who to send the email from', 'wp-graphql-send-mail'),
Expand Down Expand Up @@ -179,6 +183,13 @@ function wpgraphql_send_mail_options_page()
return isset($payload['to']) ? $payload['to'] : null;
}
],
'cc' => [
'type' => 'String',
'description' => __('Add carbon copy for secondary recipient.', 'wp-graphql-send-mail'),
'resolve' => function ($payload, $args, $context, $info) {
return isset($payload['cc']) ? $payload['cc'] : null;
}
],
'replyTo' => [
'type' => 'String',
'description' => __('reply To address used', 'wp-graphql-send-mail'),
Expand Down