Tag Info

Hot answers tagged

2

From: is just another mail header. You need to concatenate this with your current $headers and pass it as one argument to mail(): $headers = "From: $sender <$senderEmail>\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; // la de da mail( $recipient, $subject, $mailBody, $headers );


2

If I'm understanding you right you just are having trouble getting the from set? the easiest way would just be adding the from in the email headers in the wp_mail function. Here is an example of one of my old simple email sending functions that works function contact_send() { $title = 'New message Received'; $headers = array('From: ...


1

I think you will require to custom develop some part of it but most of it can be done with Contact Form 7 plugin. You can create forms with upload fields very easily in Contact Form 7. And you can make it visible for loggenin users only like this. <?php if ( is_user_logged_in() ) { echo do_shortcode('[contact-form-7 id="91" title="Form"]'); ...


1

admin_url( 'admin-post.php' ) is the non-ajax version of admin_url( 'admin-ajax.php' ) Similar to admin-ajax.php it will fire one of four hooks: Logged out users admin_post_nopriv_{action} ($_REQUEST['action'] specified) admin_post_nopriv (no $_REQUEST['action'] specified) Logged in user admin_post_{action} ($_REQUEST['action'] specified) ...



Only top voted, non community-wiki answers of a minimum length are eligible