Like so:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$to = $_POST['to']; $from = $_POST['from']; $name = get_bloginfo('name'); $headers = 'From: ' . $name . ' <' . $from . '>' . "\r\n"; $subject = 'Hello there'; $msg = 'Visit my site <a href="http://magnus.tech">magnus.tech</a>'; $attachment = array(WP_CONTENT_DIR . '/uploads/image.png'); wp_mail($to, $subject, $msg, $headers, $attachment); |