admin管理员组文章数量:1122832
I have developed an app, which is connected to my WordPress Backend. I would like to provide my User (WP User) an email function to send and receive mails without using a dedicated email account (through http request in the app). WP User should send out an email via my WP Backend and getting emails via the same backend. Email address should be a random generated one.
What would be the best way to achieve this, is it possible to use my WP Backend like a mailserver. I do not expect a heavy email traffic for my planned usage. Maybe there is already existing plugins which I do not covered. I am happy about every feedback.
I have developed an app, which is connected to my WordPress Backend. I would like to provide my User (WP User) an email function to send and receive mails without using a dedicated email account (through http request in the app). WP User should send out an email via my WP Backend and getting emails via the same backend. Email address should be a random generated one.
What would be the best way to achieve this, is it possible to use my WP Backend like a mailserver. I do not expect a heavy email traffic for my planned usage. Maybe there is already existing plugins which I do not covered. I am happy about every feedback.
Share Improve this question asked May 10, 2024 at 9:11 devreklimdevreklim 31 bronze badge 4- Here's an old question about receiving email. There wasn't a solution. – Rup Commented May 10, 2024 at 10:45
- You probably either want to 1) set up a separate mailserver service, and use WordPress to read and write emails through it using IMAP; 2) find an existing online mail sender service that supports receiving emails too, e.g. using a management API to set up the random addresses for receive, and integrate with that. (It's also possible your host won't let you run your own mail server, or at least that was a common policy a while ago because customer-run servers were an attack vector and got exploited.) – Rup Commented May 10, 2024 at 10:47
- I was expecting that this is a common request from users of wordpress. So am I right, that this has to be developed then individually with an external mailing service? – devreklim Commented May 10, 2024 at 10:57
- Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Bot Commented May 13, 2024 at 17:36
1 Answer
Reset to default 0Sending mails from WordPress is pretty straightforward, using wp_mail
. The tricky bit is receiving mail. You could probably achieve this by hijacking the method that WordPress has to post by mail. In that code you see this line:
do_action( 'wp-mail.php' );
This allows you to take over the posting process. So, in stead of posting the content of an email you could do something else with it, for instance store it in a table that is attached to a user's profile.
Making this happen is likely a lot of work. Going with @Rup's suggestion to use an external server is probably a better idea.
本文标签: wp mailSend and receive emails with wpmail() for WP User (like Mailserver)
版权声明:本文标题:wp mail - Send and receive emails with wp_mail() for WP User (like Mailserver) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736307567a1933356.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论