Closed ILM126 closed 8 years ago
same issue here. Was not delivered or caught in spam filter
I got my email and i use gmail so might be a localized problem.
It's more widespread than gmail. I run my own mailserver, and there's no sign of a delivery attempt from spacedock.
mta logs show delivery to google frontend servers, but my guess is google is silent discarding or spamming the messages. my full time job is email troubleshooting, so if i were to venture a professional guess, I would say that the reason is not passing on the emails on to inboxes is because the sending IP we're using is not established yet. It needs to build up reputation, and that could take a while... anywhere from 48 hours to two weeks.
But I can confirm that it's not an issue on our end. Google is responding with a 250 and accepting the message. It's just passing it internally to the user mail boxes. Hence why I suspect a silent discard and the reasoning behind it.
Closing because this isnt an issue on our end.
As per this. Could it be because we are not passing a Message-id? I know you just closed this, but I did some digging earlier and was about to see if someone had brought it up...
@inigmatus would be the one to ask about that.
i can't reopen GH issues unfortunately
@ThomasKerman ideas?
check that. i can re-open.
Looking at those gmail bulk mail standards, and comparing against a message I received from SpaceDock already.
Message ID looks OK to me, and is generally added by the MTA (mail transfer agent). What they recommend that's missing though, is the "Precedence: bulk" header field. That would need to be added in the same function as my current PR for #68 for dealing with the "To" field, just outside the loop where "From" (etc) is set.
message['Subject'] = subject
message['From'] = sender
message['Precedence'] = 'bulk'
for group in chunks(recipients, 100):
message['To'] = "undisclosed-recipients:;"
print("Sending email from {} to {} recipients".format(sender, len(group)))
smtp.sendmail(sender, group, message.as_string())
smtp.quit()
Would that be correct?
Been a while since I have worked with smtp servers
Edit: Updated per @jwolff52
I believe it should be message['Precedence'] = 'bulk' Or am I misunderstanding something?
That sounds like it would be more likely, To be honest I just googled it. Haha
Lol I think what you had is php not python :P
Eh same difference. :p
However, just thinking about it, do we want confirmation emails and the like to show up as bulk as well? Because all of the emails pass through this method. So perhaps we should check if recipients
has more than one person in it and then set the precedence:
if len(recipients) > 1
message['Precedence'] = 'bulk'
That's a good idea. In fact, the change I was making to hide the "To" field could probably use the same if conditional. No need to hide the "To" if it's going to one person.
Very true, didn't even consider that as I was driving when I was typing that...don't text and drive kids.
So we end up with something along the lines of this perhaps?
message = MIMEText(message)
if important:
message['X-MC-Important'] = "true"
message['X-MC-PreserveRecipients'] = "false"
message['Subject'] = subject
message['From'] = sender
type = 'To'
if len(recipients) > 1:
message['Precedence'] = 'bulk'
type = 'Bcc'
message['To'] = "undisclosed-recipients:;"
for group in chunks(recipients, 100):
message[type] = ";".join(group)
print("Sending email from {} to {} recipients".format(sender, len(group)))
smtp.sendmail(sender, group, message.as_string())
smtp.quit()
Edit: Added Undisclosed recipients to the To field if we have more than one recipient
I've updated my PR #82 to include this.
:+1: Looks good to me, I forgot we don't have to add them to the Bcc field :P
Yup, BCC doesn't technically exist that way. ;)
What's funny is the code snippet you posted, I was in the middle of editing it myself at the same time. lol
Just an update on this. The email arrived just fine - almost instantly. But it ended in gmails spam-folder.
That's probably to be expected until we build up reputation.
@Orkeren At least it's a start :grinning:
For what it's worth I just created my account, received email within seconds and was in inbox. Congrats on not being spam?
After almost 3-4 hours since I registered, no emails have been received. Not sure if Google is just blocking emails or if it is just the mail system being slow.