diff --git a/includes/class-wp-smime.php b/includes/class-wp-smime.php index 20527cf..776aeac 100644 --- a/includes/class-wp-smime.php +++ b/includes/class-wp-smime.php @@ -107,7 +107,7 @@ public static function pemToDer ( $pem_str ) { * @return array|FALSE An array with two keys, `headers` and `message`, wherein the message is encrypted. */ public static function encrypt ( $message, $headers, $certificates ) { - $infile = tempnam( '/tmp', 'wp_email_' ); + $infile = tempnam( sys_get_temp_dir(), 'wp_email_' ); $outfile = $infile . '.enc'; $plaintext = ( is_array( $headers ) ) ? implode( "\n", $headers ) : $headers;