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:
- Setting $_SERVER[‘HTTPS’]=’on’ prevents access to wp-admin
- How to add some custom HTML to the edit posts page
- Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
- How to disable wordpress confirmation email for new users
- How to Join two tables from separate databases within WordPress
- 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
- Performance issues with large website [closed]
- Different Webhost and using Google Mail server: Is there a better way than SMTP?
- How to override wp-admin styling
- Admin username and password
- White Screen of Death – wp-admin
- 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
- 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
- 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
- Call to undefined function wp() in wp-blog-header.php
- 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
- PHP version problem?
- How to retrieve the sender email with wp_mail()?
- Programmatically create page when saving custom post type post
- WordPress admin is incredibly slow [closed]
- inserting a post from an extern php file but post content doesn’t show on wp site
- 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
- WordPress ajax-action failing because of newline in response
- get_total () returns 0 – woocommerce [closed]
- Link blogname and blogdescription to the Options Framework
- retain querystring values when savincustom options in admin
- Usage of call back function of add_meta_box()
- WordPress wp-admin redirect and exception
- Get user custom field value on function.php
- difference between sanitize_email ,FILTER_VALIDATE_EMAIL and input email type in html5
- WordPress redirects to old login after migration
- I installed WordPress locally now how do I login?
- How to debug failed changes to posts?
- Is there a (offical) way for a theme to deactivate itself and show a message in admin?
- How do I attach an invoice PDF to an email in the Dukapress plugin for WordPress?
- Help with accessing wp-admin page and resolving error messages
- How to setup the Email piping in WordPress plugin?
- How can I update WordPress plugins or WordPress itself in all server?
- 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
- Search bar for wp menu
- Fatal error login WordPress [duplicate]
- Fatal error: wp-settings.php on line 199
- Hide Approved status for certain users in users list
- Class ‘WP_Privacy_Requests_Table’ not found
- wordpress contact form messages not sending although it saying they were sent successfully with this php code
- Woocommerce checkout page – custom field checkbox value into email
- Save custom field on WP_List_Table
- Create “blank” admin page without having admin-bar/admin-menu for faster load
- How to separate the taxonomies list from the form so that editing taxonmies is the same as pages and posts?
- Editing the term_order field
- How to disable sub menu items from being created?
- Access to “My Site” is missing from the admin bar
- spl_autoload_register is slow for WordPress sites
- WP post meta – for loop inside for loop
- Changing default WPMU emails to be send thorugh Campaign Monitor Transactional emails
- Send email to users when they get new followers
- HELP! Frontend User Profile Edit Won’t Update Email
- 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’
- Issue with search form admin panel after PHP migration
- Renaming “Expand Details” within “Add Media”
- Trying send mail from Theme page
- Add options to WordPress backend
- Styling admin page rows in order of importance (checkboxes)
- Cron job to call php to email last 24 hours posts
- admin-ajax.php loading many times
- What’s the .php file which generates the Custom Background page in the admin panel?
- How to replace wp-admin login page to another location?
- Adding jquery using php function
- Why can’t I enter the wordpress admin interface?
- Dynamic Email Handler with ‘header (“Location: …’
- How to change wp-admin and wp-login urls
- How to create a User Role and give permission to only use Web Stories plugin?
- Why is my custom email notification after purchase not sending?
- Restricting access to a file for everyone except logged in users
- Send emails to individual subscribers when CPT post is deleted (trashed)
- Send summary email from a form with wp_mail
- 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?