Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Multi-User Mails Redundancy #6

@InternalLoss

Description

@InternalLoss

In the PHP implementation, if multiple recipients are specified, then the scripts simply just create the mail multiple times, wasting a lot of database space.

Example:

2017/11/26 15:50:57 MAIL FROM: w0425094837938027@rc24.xyz
2017/11/26 15:50:57 RCPT TO: w0526816004530984@rc24.xyz
2017/11/26 15:50:57 RCPT TO: w6311741278376856@rc24.xyz
2017/11/26 15:50:57 RCPT TO: w3382748233334654@rc24.xyz
2017/11/26 15:50:57 RCPT TO: w1657786287988553@rc24.xyz
2017/11/26 15:50:57 RCPT TO: w6330930957365086@rc24.xyz
2017/11/26 15:50:57 RCPT TO: w3629867599800416@rc24.xyz
2017/11/26 15:50:57 RCPT TO: w5353178968036283@rc24.xyz
2017/11/26 15:50:57 RCPT TO: w7690531007008327@rc24.xyz
2017/11/26 15:50:57 DATA
2017/11/26 15:50:57 Date: 26 Nov 2017 21:39:16 -0000
2017/11/26 15:50:57 From: w0425094837938027@rc24.xyz
2017/11/26 15:50:57 To: w0526816004530984@rc24.xyz,
2017/11/26 15:50:57  w6311741278376856@rc24.xyz,
2017/11/26 15:50:57  w3382748233334654@rc24.xyz,
2017/11/26 15:50:57  w1657786287988553@rc24.xyz,
2017/11/26 15:50:57  w6330930957365086@rc24.xyz,
2017/11/26 15:50:57  w3629867599800416@rc24.xyz,
2017/11/26 15:50:57  w5353178968036283@rc24.xyz,
2017/11/26 15:50:57  w7690531007008327@rc24.xyz

Would create 8 separate mail entries in the database, wasting space.
Tying in with #5, we could parse the mail and then have recipient ids in an indexable format where the database could select mails the user has not yet received, however once they have received it remove their Wii ID from the recipient list (for the sake of semantics you'd want to simply set them as sent so that the original mail contents are not edited but, to be honest, missing out all recipients except the ones that haven't yet got the mail shouldn't be an issue, it's not a security flaw).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions