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 );
Related Posts:
- What characters are allowed in an email address?
- how to set from address according to the form input email address for wp_mail()?
- Sending form data via PHPMailer – How to action PHP script from a form
- Contact Form 7 not sending emails- no confirmation, no error [closed]
- Remove field in the form : only works for “url”, not for “email”?
- Downloadable content only for subscribers?
- WordPress Emails & Contact Forms [closed]
- Saved emails at dashboard
- Email from my theme’s contact form doesn’t get the reply-to address right
- Email form getting hacked
- Am receiving more than thousand mails in single day from ‘[email protected]’ continuously
- Sending Form data as Attachment
- Sending email via function in page or setting up the action properly in another page
- Send contact form to a specific referrer-email adres
- Username from e-mail
- Send message to author without showing email address [duplicate]
- Submit button returns to index page instead of sending data
- Form that stores emails [closed]
- How can I add email code authentication on form submission without any wp plugin?
- How to handle form submission?
- Add error message on password protected page
- using update_user_meta in form to set and get custom meta
- User registration problem in WordPress
- Include HTML template file in wp_mail
- show image in mail contact form 7 [closed]
- Submitting post to database then redirecting to paypal
- Registration form labels – add asterisk
- How to create and retrieve data from a special registration form?
- Contact form 7 Dynamic text – placeholder on GET field
- Settings API erases itself?
- Wp_mail Returning False on Server
- How to update selective options on plugin settings page
- Help with verifying google recaptcha in a custom form
- Duplicating/Cloning Multiple Form Fields
- Mail Form in a modal box without plugin
- Processing a subscription form with POST method?
- How am I able to get the value out of cookie array when I push a button?
- What is the valid phone number format accepted by contact-form-7 [closed]
- How to implement post/redirect/get pattern on contact form
- Creating a custom multilingual form
- wordpress not displaying my form
- Send email button in custom post type backend
- Hook into and send mail using WP Mail SMTP type plugin from HTML static front page?
- not logged in users can’t submit form
- post request does not redirect but why
- How can I create registration form for users which I can assign role and profile picture?
- Creating User Form Submission – Only allow them to see their own submissions
- Show the submitted values in the form when validation fails
- Using Contact Forms to Send Private Information [closed]
- Adding a new user from the front end
- Saving frontend form data in wordpress
- Comparing formidable pro and gravity forms [closed]
- Programmatically populate form fields with data
- advanced custom fields and contact form 7
- Stop SPAM from custom form
- Custom tables and using wpdb to insert into DB from a html form
- Send value of PHP variable in template via hidden field in a form
- Custom form handling in WP.. the correct way?
- WordPress Frontend Post Form (Bootstrap Modal) Not Creating Post
- How to use HubSpot Forms API in WordPress pages?
- Front end update_post_meta Help
- retrieve all emails as database in wordpress to view all sent emails
- Update user meta on custom wordpress form and redirect
- Contact Form 7 Plugin emails not being received by some accounts
- How to stop direct HTTP POST to a PHP script?
- Embed IPB forums to wordpress page
- Unable to upload data to Media Libary
- Programming WordPress to send a custom-built form to specified email address
- Where this validating message come from?
- Contact form – problem with displaying message about sent mail
- How to add custom regex validation to WPForms password field
- Form Post / Session Variables not Working in Query with Pagination
- Submit Multi-Part Form After Each Part
- Populate a custom form with user data [closed]
- Caldera Forms Manual formula
- Form element name – array type is not working
- Embedding Links to WPForms on a WP Page
- Scroll Form with page scrolling and add form on slider
- Reading POST over admin-ajax.php
- Back button not working after input / search submit
- I am trying to add checkbox for anonymous post on form post
- How to send custom mail when a user complete a specific form
- Auto Submit Contact Form 7
- Simple filter to change label name of Email Adress to something else
- Custom transactional emails on user signup with wp_add_user
- WordPress, Front-end send message to authors using plugin when their post is published
- Generating unique PDF download link after user input
- How can I automatically send an email with an excel file containing submissions for a form rather than an email per submission?
- Update a string from the front-end
- Update post meta without deleting the old entries
- How to creat form with get method and receive it
- How to know if a tag has been added within a taxonomy?
- Custom form values without plugin [closed]
- Turkish Character Problem on mailing
- How to add contact form instead of checkout
- From contact form to paypal
- Dynamic price for payment button
- Forms lead to “Page not found” in Ultimate Member plugin
- How to use tag in wordpress?
- Implementing Autosave Functionality for Long, Multi-page Forms in WordPress