Ok, then you can try this
You can set the header, just not with a parameter. WordPress uses “hooks” and the hooks you need are ‘wp_mail_from’ and ‘wp_mail_from_name’ hooks.
Here are the hooks you might add to your theme’s functions.php file to modify the “From:” header when using wp_mail() to the email address Greg j :
add_filter('wp_mail_from','yoursite_wp_mail_from');
function yoursite_wp_mail_from($content_type) {
return '[email protected]';
}
add_filter('wp_mail_from_name','yoursite_wp_mail_from_name');
function yoursite_wp_mail_from_name($name) {
return 'Greg j';
}
Related Posts:
- SMTP connect() failed PHPmailer – PHP
- What is the difference between ports 465 and 587?
- Email validation in Ruby on Rails?
- How do I customise the new user welcome email
- How do you update user_email on the front end in WP 3.3?
- User Without Email?
- Email confirmation on registration
- Customizing lost password email
- Create custom welcome email without a plugin
- How do i send mail with custom Form Data using WordPress
- Email as Username in registration
- Fwd: [Website Name] Notice of Email Change [closed]
- Send all WPMU emails via SMTP
- Locked out of my own blog and password reset not working
- email wordpress users using BCC
- How to add line breaks to $email[‘body’] when using auto_core_update_email hook
- How to sent one form values to 2 different sites in wordpress
- apostrophe in email name
- General Setting Allow Multiple Email Notification
- Can I configure WordPress to use postfix without a plugin?
- How to validate website field in contact form 7?
- Trigger WordPress Actions from Email?
- How to change WordPress email notification sender?
- Contact form sender email
- WordPress Add New User – Send an Activation Email
- Send email only upon draft
- Sending emptys emails every day, How stop it?
- Emails marked as spam because it’s contain via box4231.bluehost.com
- How to change the text of automatic E-Mails e.g. after changing your password? (German localization)
- WordPress reset password email is not working – woocommerce and checkmail does work
- How do I make WordPress send an email to the user when his account gets approved (manual by me)
- User registration email and let user choose pasword
- Correctly configure SPF/DMARC record to work with WordPress [closed]
- Share pdf with a friend via email [closed]
- Mail function is not working
- Emails not getting delivered to Hotmail addresses
- How to set up a simple email subscription?
- Email user on WordPress upgrade
- Send bulk emails without timeout
- How to send post notification when a Author and Contributor post?
- Prevent sending emails on user creation in OOP context?
- WordPress get_the_content losing formatting when emailed
- Mailing list sign up form without plugin
- Retrieve duration since sign up
- Send email when publish new post in certain categories
- WordPress Won’t Send Email When a User Register
- Is it possible to not receive email notifications for comments?
- Automatically email daily archive
- Confirmation required on users email change
- Email address used by website but I do not know where
- wp_mail not sending email on custom function
- Changing wordpress admin email [closed]
- Change email address change notice from WordPress
- Getting image in mail
- WP stopped emailing notifications about new comments
- How to prevent the scheduling of the same event on the same day
- Is there a way to follow a WordPress site by email alerts for new posts? [closed]
- How to change the format of the subcriber email
- wp_mail() won’t send mail when it’s a variable, only when hard coded
- Resend password chosen by WP administrator? [duplicate]
- Send email for confirmation during user registration
- I just had an email from wordpress. what does it mean?
- Images in wp_mail not showing
- Alternative to email notification system?
- Why would it take four reset password attempts to finally get the e-mail?
- phpmailer reply to message id using AddCustomHeader
- About Custom Email Template Design Responsive
- Send email using wordpress plugin on behalf of someone with their permission
- How to apply a function to the value $email of get_user_by to override email_exists?
- Email Notify author of posts if content is out of date (older than 6 months)
- Use [from-email] from the contact form as sender’s email
- WordPress won’t let me change my administration email address
- wp_mail send multiple emails in a loop
- Can’t change headers / From for wp_mail()
- How to customize ‘WordPress’ in sent email using wp_mail function?
- New user notification issue
- E-Mail Notification on post edit
- Notification Email Address not changing
- Why do WordPress emails to multiple recipients include \n in the list
- Whitelist email sent by WordPress
- delete of @ in emailaddress when starting unsubscribe link in url
- Showing “diaplay_name”
- is_email() function Not Validating within Foreach Loop
- Garbled Code added to Email Field at ‘Quick Edit’ comment screen
- Send Custom Post Notification to Followers
- Get emails of register user in WordPress
- Send email from WordPress
- Email setting in wordpress
- Not able to override pluggable function with a mu_plugin
- Display “a generated one [avatar] based on their e-mail address”
- Allow users to register as a higher role than default with code
- Send email once every 12 months to a particular user [closed]
- What’s the simplest way to send WordPress posts to a Mailchimp list? [closed]
- Having Issue on Receiving Emails From @Gmail.com or @Yahoo. in WordPress Using PHP Mail Function
- Fighting Spam – What can I do as an: Email Administrator, Domain Owner, or User?
- Where does email sent to *@example.com go? [closed]
- How to send emails and avoid them being classified as spam?
- How to add verification on email address change?
- Is there a wordpress function restrict public email id for registration like as is_email()
- What’s the optimum way to collect users’ email id?