How can i enable mail in wordpress?

Firstly you need to lớn Login to lớn your Cpanel.Then go lớn E-Mail Section > then Cliông xã Registered Thư điện tử IDs.then add domain(wordpress
blog.yourtên miề . then submit , it will takefew minute lớn activate can wait 15minute lớn 1 hour depending khổng lồ your hosting provider, then it will work.

Bạn đang xem: How can i enable mail in wordpress?

answeredNov 13, 2019AbhijitJ38.6k pointsselectedNov 18, 2019by sadmin

Your phản hồi on this answer:

Your name to lớn display (optional):
Email me at this address if a bình luận is added after mine:Email me if a bình luận is added after mine



First find the file where the error message appear. I use Notepad++ and theCTRL+Fcomm& khổng lồ search in files. It is a good idea to lớn search only the first few words of the error message, because some error messages are combined of different messages.

Your error message appear inwp-login.phpand holy luông xã, only there. So let's have sầu a look why this error could occur.

if ( $message &và !wp_mail($user_gmail, $title, $message) )

STEPhường. 2:

There are two conditions.$messagehave to be true (not an empty string, not false, not null, etc). Andwp_mail()shouldn't return false.

One line above sầu, there is a filter$message = apply_filters('retrieve_password_message', $message, $key);, so it is possible that a plugin (or theme) use this filter và returns a value that is not true (empty string, false, null, etc.).

Xem thêm: Hướng Dẫn Cách Phát Wifi Từ Máy Tính Bảng Android Đơn Giả, Cách Phát Wifi Từ Máy Tính & Laptop Win 10/8

But it is much easier lớn check ifwp_mail()is working or not. Write a small plugin lớn skết thúc a thử nghiệm mail to yourself:

http://yodomain * Description: Send me a chạy thử tin nhắn * Version: 0.1 * Author: Ralf Albert * Author URI: http://yodomain * Text Domain: * Domain Path: * Network: * License: GPLv3 */namespace WordPressStackexchange;add_action( "init", __NAMESPACE__ . "plugin_init" );function plugin_init() $khổng lồ = "your-email-adress
some-domain.tld"; $subject = "Testemail"; $message = "FooBarBaz Testmail is working"; wp_mail( $lớn, $subject, $message );(This is PHP5.3 code. If you are running PHP5.2, remove sầu the namespace things)

The plugin should send a testmail immediately after activation. If not, calling some backkết thúc pages (e.g. dashboard) should vì it.

If the testmail does not arrive sầu, then you probably have sầu an issue withwp_mail(). So turn on debugging:

define( "WP_DEBUG", true );define( "WP_DEBUG_LOG", true );define( "WP_DEBUG_DISPLAY", true );
ini_set( "display_errors",1 );Put this code into yourwp-config.php& retry sending yourself a testmail. Now you should get some error messages and they also should be logged intowp-content/debug.log(The debug log can grow very large if there are more errors caused by plugins and/or themes).

At this point, you got good informations ifwp_mail()fails & if so, why. Ifwp_mail()work correctly và the testmail arrived, go baông chồng lớn top và find out why$messageis not true.

Xem thêm: Cách Sửa Lỗi Laptop Không Kết Nối Được Wifi Win 10 Và Cách Khắc Phục

If you have issues withwp_mail(), so keep in mind thatwp_mail()does not use PHPsmail()function. WordPress use a PHP class (PHPMailer). Maybe you just needa plugin lớn use SMTPinstead of sendmail. Or the problem is located at another place. We don't know. You have sầu khổng lồ investigate.

Chuyên mục: Kiến thức Hosting