HiChina hosts all seem to need to send emails through SMTP, and enable fsockopen. However, the SMTP sending method of WordPress is steam_connect_client instead of fsockopen.
HiChina hosts all seem to need to send emails through SMTP, and to enable
The small editor first encountered a solution to sending an email with the prompt "cocould not connect to SMTP host". After the solution, it was found that wordpress is now in version 4.0, and the above method is not enough, certainly cannot solve
Recently, a friend made a blog using WordPress, but he was worried about sending emails. by default, WP cannot send emails to Unix mail servers, such as Sendmail. I have been busy for two days and basically solved this problem. while hanging out in
The SMTP sending method of wordpress uses steam_connect_client, while the HiChina host provides fsockopen, so to send the mail smoothly, you also need to modify the source file class-smtp.php of the wordpress program, change the SMTP sending method
The Wp_mail () function is used to send mail, similar to the PHP Mail () function.
The default sender name is WordPress, and the sender's mailbox is similar to the wordpress@example.com one.usage
Wp_mail ($to, $subject, $message, $headers, $
Solution 1: Are you not configured?In fact, it is very simple: log on to the background --> set --> discuss, and then set it according to the following figure (this is version 3.0.1, and other versions are similar ):After setting up, you can send a
In order to increase WordPress's blog interactivity, some content may require visitors to sign up for login before viewing. WordPress Default Registration method is to obtain a random password in the form of mail and complete registration. However,
Change the message content type to HTML
In WordPress
Send mailYou need to use the Wp_mail () function, but the default type of message content is "Text/plain", that is, HTML is not supported.
If you want to add HTML code to the message content, you
It's been a whole afternoon today.The first is the mailbox, WAN host is not supported by the mail () function, so the default is not available, if you want to send messages, you can only use the Fsockopen () function. First go to WAN Network host
Recently migrated WordPress, System upgrade to CentOS 6, a very strange problem, in the original CentOS 5.8 under the normal scheduled backup database and sent by mail script can not send attachments, others are normal, the message content is also
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.