电子邮件应用程序设计,如何管理附件和消息?

发布于 2024-11-19 22:54:33 字数 432 浏览 3 评论 0原文

我正在做一个电子邮件应用程序,它将允许多个附件,并且电子邮件将在预定日期发送。我这里有一些设计问题。请用您的经验知识指导我。

电子邮件将存储在数据库表中,但附件将存储在服务器上的文件夹中。用户将首先上传文件,然后他的电子邮件将存储在数据库中。我有消息和附件表。但有些情况系统应该能够处理。

  1. 我应该如何存储不同用户的电子邮件附件(在一个文件夹或多个文件夹中)?
  2. 应如何管理附件命名,多个附件(由一个或不同用户)可以具有相同的名称?
  3. 用户可以上传文件,但稍后可以留言,系统将如何处理此类附件?
  4. 在用户按钮(保存或草稿)按下或撰写页面请求时将电子邮件保存在数据库表中的最佳时间是什么?如果您建议页面请求,那么如何处理未成功完成的消息?

如果我还缺少任何其他内容,请指导。

我将更加感谢您的指导、时间和真诚的建议。

I am doing an email application which will allow multiple attachments and emails will be send on schaduled date. I have some desgining issues here. Please guide me with your expereienced knowledge.

Email will be stored in db table but attachments will be stored in a folder on server. User will upload files first later his email will be stored in db. I have messages and attachments tables. But there are some cases which system should be able to handle.

  1. How I should store attachments of emails of different users (in one folder or in multiple folders) ?
  2. How attachment naming should be manged, more then one attachments (by one or different users) can have same name ?
  3. User can upload files but later can leave composing message, how system will handle such atachments ?
  4. What will be best time to save email message in db table on user button (save or draf) press or compose page request ? If you suggest on page request then how to handle messages that were not successfully finished ?

Plase guide if I am missing any thing else.

I will be more thankful for your guidance, time and sincere advice.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

[浮城] 2024-11-26 22:54:33

关于草稿的存储,您有多种选择:

  1. 单独的草稿表(或一组表)
  2. 将消息标记为草稿

如果草稿可以在一段时间后自动删除,则第一个更容易。处理编程以保持其隔离也可能更容易,但将数据库中的电子邮件标记为草稿也可以。

什么时候保存?我会保存草稿并准备发送电子邮件,因为如果您不保留它们,则丢失它们的风险太大,并且保留到共同位置会更好。

多个文件同名?您可以将用户的项目物理分离到不同的目录中,或者更改文件的名称并将其应具有的名称存储为附件,并在发送电子邮件时将其“重命名”回来。

如何处理从未正确撰写的电子邮件附件?这是一项商业决策,而不是技术决策。无论您选择什么,用户都应该了解规则。

You have a couple of choices on storage of drafts:

  1. Separate draft table (or set of tables)
  2. Mark message as draft

If drafts can be auto-deleted after some time, the first is easier. It may also be easier to handle the programming to keep it isolated, but flagging the email message in the database as draft works, as well.

When to save? I would save both drafts and ready to send emails, as there is too much risk of losing them if you don't persist them and persistence to a common location is nicer.

Multiple files with same name? Either you physically separate the user's items into different directories or you change the name of the file and store the name it should have as an attachment and have it "renamed" back when the email is sent.

How to handle attachments of emails never properly composed? that is a business decision, not a technical one. Whatever you choose, the user should know the rules.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文