I found the issue, had to edit /etc/php/8.3/cli/php.ini
file, by adding/editing following lines :
[mail function]
; For Win32 only.
; https://php.net/smtp
#SMTP = localhost
SMTP = mysmtpserver.domain
; https://php.net/smtp-port
smtp_port = 25
username = myusername
password = mypassword
sendmail_from = [email protected]
Then a service nginx restart
.
I still don’t understand why PHP is able to send mails through mail()
function, but WordPress need the php.ini file to be configured…
Anyway, hope this helps !
Related Posts:
- How can I send an email using PHP?
- Setting $_SERVER[‘HTTPS’]=’on’ prevents access to wp-admin
- 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 add some custom HTML to the edit posts page
- Site Title and Tagline in Theme Options Page
- Jquery no more loading, load-scripts.php not found (404)
- Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
- How to disable wordpress confirmation email for new users
- Admin Media grid view images won’t load
- How to Join two tables from separate databases within WordPress
- Site Title and Tagline in Pagelines DMS Options Panel
- Enqueue Javascript Correctly for 3.5
- 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
- Sortable admin column for one meta key with three possible meta values
- Woocommerce HTML email option unavailable
- WordPress if (is_page) translation on certain page
- Performance issues with large website [closed]
- 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?
- How to override wp-admin styling
- List User order by ID in Descending order (Backend)
- JQuery not working on WordPress Admin page [closed]
- Admin username and password
- White Screen of Death – wp-admin
- Attaching a pdf to Contact Form 7 e-mail via functions.php [closed]
- Can’t extend some core classes
- Setting up 2 SMTP accounts: 1 for wordpress and 1 for woocommerce
- Retrieving Author ID in wp-admin area
- Set a condition based on WooCommerce checkout city field while placing order
- WooCommerce – Email admin with new user details
- How to create a form and display its content as table in admin panel?
- Namespace spl_autoload problem in WordPress admin
- Unreadable pagination
- 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’?
- remove wp floating submenu in wp dashboard
- My custom wp-admin php files stopped working
- PHP 8, AJAX mail form to function.php doesn’t work
- Capture User Email Address When Filling Out Form
- Call to undefined function wp() in wp-blog-header.php
- Cannot access wp-admin (wordpress dashboard)
- Cannot access wp-admin/wp-login.php (WordPress backend) anymore, what could be wrong?
- Remove metabox from WordPress menu editor page?
- How to make my custom widget appear within WordPress widgets? Plugin development
- Send multiple attachments with wp_mail in PHP
- Admin backend, show post from a category and exclude the posts from subcategories
- Send email to users when they get new followers
- HELP! Frontend User Profile Edit Won’t Update Email
- Right way to display the_author_meta fields?
- Use page-templates without creating theme
- Get value of submit button in custom post type
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- wp_query beginner
- How can disable wordpress emails notifications?
- I changed the password for the database user of my website, updated wp-config.php and wordpress asks to be reinstalled
- Woocommerce custom field on emails outputs ‘Array’
- admin uploads pre_get_posts not working as expected
- Issue with search form admin panel after PHP migration
- 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
- Renaming “Expand Details” within “Add Media”
- WordPress error on my website
- Trying send mail from Theme page
- Add options to WordPress backend
- Styling admin page rows in order of importance (checkboxes)
- 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
- admin-ajax.php loading many times
- WP Login Button for current domain
- What’s the .php file which generates the Custom Background page in the admin panel?
- Adding multiple emails to a
- How to replace wp-admin login page to another location?
- How can I prevent wordpress from sending emails
- Adding jquery using php function
- Why can’t I enter the wordpress admin interface?
- How do I change the Go To Categories link in the term_updated_messages
- Why can’t I enter the wordpress admin interface?
- Dynamic Email Handler with ‘header (“Location: …’
- What is the best way to reset the site? Different fails while set up
- Customize the summary table of an order in the email
- How to change wp-admin and wp-login urls
- Why does WordPress not send the user the email to add a password?
- How to create a User Role and give permission to only use Web Stories plugin?
- Add Woocommerce Customers link to custom admin menu
- Why is my custom email notification after purchase not sending?
- Restricting access to a file for everyone except logged in users
- How rename wp-content and wp-admin folders correctly
- Send emails to individual subscribers when CPT post is deleted (trashed)
- How to access admin menu labels and links on front-end?
- I’m unable to remove the code that I used to restrict access to the profile page for subscribers
- Send summary email from a form with wp_mail
- WordPress Theme file editor – error with sleep() php function
- Trouble with WordPress Settings API: Form Submits When Fields Called Directly, Fails When Using Callbacks
- How to Customize the Admin Sidebar Menu in WordPress Multisite Network by changing the backend code of the wp-admin code files?
- How can I catch WordPress custom settings page slug has already changed?