接收电子邮件、处理它们并将它们保存在我的 Web 应用程序的数据库中 [英] Receiving emails, processing them and saving them on the database of my web application

查看:30
本文介绍了接收电子邮件、处理它们并将它们保存在我的 Web 应用程序的数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以某种方式接受传入我的 Web 应用程序的电子邮件并将它们保存在数据库中.我的网络应用程序是用 PHP 语言编写的,我使用的是 MySQL 数据库.

I need in some way to accept incoming emails to my web application and save them in the database. My web application is written in PHP language and im using MySQL database.

我不知道该怎么做...我自己构建了其余的 Web 应用程序,但这对我来说非常复杂.

I have no idea how can i do that... I builded the rest of my web application by myself but this is very complicated for me.

例如,我需要知道如何首先接受传入的电子邮件……以及在哪里接受?我的 Web 应用程序将在哪个电子邮件地址中接受这些电子邮件...???

For example i need to know how can i accept incoming emails first... and where? in which email address my web application will accept these emails...???

那我如何从那里得到它们?我将如何处理它们以及如何将它们存储在我的数据库中?

Then how i will get them from there? How i will process them and how i will store them in my database?

请帮我举个例子,一些代码,任何东西!接受任何帮助.

Please help me with an example, some piece of code, anything! Any help is accepted.

我不是专家,所以一段代码会对我有很大帮助.

Im not an expert so a piece of code will help me a lot.

先谢谢你!

推荐答案

你基本上有两个选择:

  1. 在您的服务器上运行 SMTP 程序(例如 Postfix 或 Sendmail)以接收电子邮件,并使用 procmail 将它们传递给您的代码

  1. Run an SMTP program (such as Postfix or Sendmail) on your server to receive the emails, and use procmail to pass them to your code

在外部主机服务上获取电子邮件帐户,并使用 PHP 的 POP3 客户端软件包之一检索电子邮件,例如 pop3class

get an email account on an external host service and retrieve the email using one of the POP3 client packages for PHP, such as pop3class

选项 1 更难做,您必须学习管理电子邮件服务器,这不是一项微不足道的任务.选项 2 相对容易,也是我推荐的选项.

Option 1 is much harder to do, and you have to learn about administering an email server, which is not a trivial task. Option 2 is relatively easy and is the one I'd recommend.

这篇关于接收电子邮件、处理它们并将它们保存在我的 Web 应用程序的数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆