-1

I have 1 million addresses in table, and 1 function to send mail to all.
The scenario i thought is make 1 task to select all 1 million emails then send one by one OR split into smaller tasks to (such as 2 tasks with 500k emails for each).
But how i manage the log when it is fail when sent to some emails.
I don't any mail module to support. I just want to know the logic.
Edit: not only email but my app also have our notification system, do it in same way for email.

Felix
  • 571
  • 14
  • 34
  • it not a real case but i want to know how i should implement when i be asked – Felix May 30 '17 at 02:31
  • Possible duplicate of [How to send 100,000 emails weekly?](https://stackoverflow.com/questions/3905734/how-to-send-100-000-emails-weekly) – Jerry Coffin May 30 '17 at 02:32
  • what i should i do when my `for` loop crash when still sending – Felix May 30 '17 at 02:41
  • i assume not using any third module, user may have email or not, or email not correct, i have to log all – Felix May 30 '17 at 02:49

1 Answers1

1

Use a legitimate bulk mail service like SendGrid.com, MailGun, etc.

If you use your own web hosted server it probably can't handle the traffic and has a good chance of ending up blacklisted so all outgoing mail will be blocked.

Dave S
  • 1,427
  • 1
  • 16
  • 18
  • how about our notification system, only internal – Felix May 30 '17 at 02:57
  • How many notifications, how many users,, and what kind of data? Would something like an RSS feed work? A staff portal or website? – Dave S May 30 '17 at 03:07
  • data now only text, it lock like notification people got in facebook – Felix May 30 '17 at 03:18
  • For staff mail boxes on the same server, your mail idea is much more likely to work than trying to bulk mail to customers. You probably do not have 1 million staff members :) . If you use BCC then you do not need to send 100 single emails you can just send 1. – Dave S May 30 '17 at 03:25