Mail returns false

phpmailfalsereturnsfunctionwordpresshostinginmotionemailstack

Last Update : 2023-09-22 UTC 13:11:48 PM

Answers of > Mail returns false

Sender is set in headers,Sender is int the w3coded hosting email form of: sender,Everything is w3coded hosting email sent correctly (body+headers+subject),SMTP is w3coded hosting email set in PHP.ini

I used this little snippet to check it out:

<?php
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
echo 'I am : ' . `whoami`;
$result = mail('myaddress@mydomain.com','Testing 1 2 3','This is a test.');
echo '<hr>Result was: ' . ( $result === FALSE ? 'FALSE' : 'TRUE') . $result;
echo '<hr>';
echo phpinfo();

The solution was setting a value in my php.ini for 'sendmail_from' and 'sendmail_path'. The correct values in my case were:

sendmail_from = "no-reply@mydomain.net"
sendmail_path = "/usr/sbin/sendmail -t -i"

I found in php configuration file php.ini, I had set up

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.
sendmail_path = "/usr/sbin/sendmail -t -i -f "care@mydomain.com"

I have changed it to below

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.
sendmail_path = /usr/sbin/sendmail -t -i -f care@mydomain.com

Try setting the

ini_set('sendmail_from', $from);

Current topics : Mail returns false

Newly Added Questions

Similar Questions

Questions :

How To Group Array Key Value

Last Update : 2023-09-22 UTC 14:11:19 PM

Questions :

PhpStorm Warning For React Attributes In Jsx File With SCSS File

Last Update : 2023-09-22 UTC 14:11:09 PM

Questions :

Why Is The File Not Showing Up In Request.files And In Request.forms Instead?

Last Update : 2023-09-22 UTC 14:11:03 PM

Questions :

Proxying Assets From React App Directory In Slim Framework?

Last Update : 2023-09-22 UTC 14:10:50 PM

Questions :

Laravel 5.4 Can't Run “php Artisan Preset React” Comand

Last Update : 2023-09-22 UTC 14:10:43 PM

Questions :

How To Update Session Values Without Signing Out?

Last Update : 2023-09-22 UTC 14:10:28 PM

Questions :

Array Is Not Visible

Last Update : 2023-09-22 UTC 14:10:20 PM

Questions :

React Routing For Login Using Symfony

Last Update : 2023-09-22 UTC 14:10:00 PM

Questions :

Sanctum With React SPA Returning 419 Page Expired

Last Update : 2023-09-22 UTC 14:09:49 PM

Questions :

How Do I Import An Input String Into Another Page

Last Update : 2023-09-22 UTC 14:09:37 PM

Top
© 2023 W3CODED - All Rights Reserved.