Confused by the Codex-Page(http://codex.wordpress.org/Function_Reference/wp_mail), where the usage did not mention attachments at all, I thought it is not possible. But a look into the file pluggable.php offered me the whole usage of wp_mail. So it is possible with just:
<?php wp_mail($to, $subject, $message, $headers = '', $attachments = array() ); ?>
Hi All,
We can use wp_mail function send emails with attachments
<?php
move_uploaded_file($_FILES[“attachment”][“tmp_name”],WP_CONTENT_DIR .’/uploads/’.basename($_FILES[‘attachment’][‘name’]));
$attachments = array(WP_CONTENT_DIR .”/uploads/”.$_FILES[“attachment”][“name”]);
wp_mail($to, $subject, $message, $headers, $attachments);
?>