To access array values within a double quoted string use the form:
$headers = "From: {$args['name']} <{$args['email']}>" . "\r\n";
You are right: your function needs one more }
to close it correctly.
To access array values within a double quoted string use the form:
$headers = "From: {$args['name']} <{$args['email']}>" . "\r\n";
You are right: your function needs one more }
to close it correctly.