It’s possible using PHP’s mail() function. Remember the mail function will not work on a local server.
<?php
$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
Reference:
Related Posts:
- WordPress refuses to send mail, “…your host may have disabled the mail() function”
- How do I override the Message-ID header of wp_mail function?
- How to disable wordpress confirmation email for new users
- Best way to create a user programatically
- Should I use wp_mail or PHP’s mail? [duplicate]
- Mail not sent when I set HTML headers
- Send PDF link in email based on radio button selection
- Woocommerce HTML email option unavailable
- Trigger Woocommerce New User Email
- Processing a subscription form with POST method?
- Different Webhost and using Google Mail server: Is there a better way than SMTP?
- Attaching a pdf to Contact Form 7 e-mail via functions.php [closed]
- Setting up 2 SMTP accounts: 1 for wordpress and 1 for woocommerce
- Set a condition based on WooCommerce checkout city field while placing order
- WooCommerce – Email admin with new user details
- How do you ensure that a user is recognised and available for use only when it is verified through a row in the database called ‘accountVerified’?
- PHP 8, AJAX mail form to function.php doesn’t work
- Capture User Email Address When Filling Out Form
- Send multiple attachments with wp_mail in PHP
- How to retrieve the sender email with wp_mail()?
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Can I get an email notification when media is uploaded to the media library?
- Woocommerce Email attachments not working – file not being attached
- Get user custom field value on function.php
- Pass return-path additional parameter in wp_mail
- difference between sanitize_email ,FILTER_VALIDATE_EMAIL and input email type in html5
- Use of antispambot with $curauth->email
- How do I attach an invoice PDF to an email in the Dukapress plugin for WordPress?
- Contact form – problem with displaying message about sent mail
- How to setup the Email piping in WordPress plugin?
- Is it secure to use SMTP password in .php file in WordPress website?
- Send an e-mail on address with the link with disliked post
- I want to fusion the product columns in email table order
- Woocommerce checkout page – custom field checkbox value into email
- Changing default WPMU emails to be send thorugh Campaign Monitor Transactional emails
- Send email to users when they get new followers
- How can disable wordpress emails notifications?
- Woocommerce custom field on emails outputs ‘Array’
- Using Custom Javascript and pHp to send email to myself when a user clicks on an input button but only works on Chrome, IE, and Micorosft Edge
- Wp_mail doesnt work
- Trying send mail from Theme page
- get_post_meta is always empty when I use wp_mail
- Cron job to call php to email last 24 hours posts
- How to check “From Email” via WordPress before an email is sent
- Adding multiple emails to a
- How can I prevent wordpress from sending emails
- Dynamic Email Handler with ‘header (“Location: …’
- Customize the summary table of an order in the email
- Why does WordPress not send the user the email to add a password?
- Why is my custom email notification after purchase not sending?
- Send emails to individual subscribers when CPT post is deleted (trashed)
- WordPress admin area not sending mail (but works with WP Mail SMTP, Test Mail, and PHP mail() function)
- Where should I install a PHP library into WordPress so that code in a webpage can activate it?
- Does the debug.log do log rotation?
- Edit postmeta when user changes user role?
- Looping through WP_Post Object
- Translating add to cart woocommerce button [closed]
- SetCookie simply not working
- Looking for most performant way to execute several similar WP queries within shortcodes
- Customize Time Stamp
- Combine two filters into a single call
- How to output widget
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- Display menu point only if there are published posts in that category
- What query string parameter is available for index.php, that works for both pages and blog articles?
- Sending data from custom inputs in WordPress comment form in the admin notification email
- Modify custom field input data before creating a new post
- Automatic Shortcode Creation with Custom Fields [closed]
- WordPress function when file is uploaded, deleted or edited
- Using a $GET parameter from a URL, to redirect to a URL (WordPress)
- wp-options keep crashing please help
- Post’s ID pattern?
- calling a custom field value inside functions.php
- User Meta Value not echoing despite Var_Dump Showing correct string
- WordPress check if current taxonomy has child
- get_theme_mod outputs number when using WP_Customize_Cropped_Image_Control
- array_rand not working correctly?
- How do I increase the upload size only when editing special pages?
- Show login greeting above sub-menu links?
- Conditional On custom field plugin metabox
- Exclude function from running on a certain page
- wordpress sql posts query won’t display the latest post in a specific category
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- How to change image product page by variation in PHP code?
- Fetch Data from an external MSSQL Database in a Managed WP hosting
- Posts page (category) layout modification, which php file change?
- How to add WordPress Featured image in tag ..?
- Php cron job (wp-cron) not working
- Huge time to first byte on live site
- CPT in a shortcode
- Make sticky post with FacetWP
- All categories options or All categories not Populating
- Can we use corePHP code in wordpress?
- how can I disallow special characters, space, capital letter, dot in user name on registration?
- Insert double entry in DB
- WordPress display name string manipulation
- WordPress create new on site when a new page is added
- Accessing WordPress Functions get_permalink() in Vanilla PHP?
- Create an if statement based on page_id
- Require Credits Footer