SendGrid/Outlook receiving 50% of emails - node.js

I've just set up SendGrid, authentificated my domain and did the sender verification.
I use Node.js to send email via the API.
When I make a test, the mail is sent to my outlook address. It takes 3 seconds to appear in Outlook, not in spam, in my inbox.
However, when I make the same test, 30 seconds later, the mail is processed by SendGrid, but I never receive in Outlook..
How can it be possible ?

please check your sendgrid activity tab. Processed doesnt mean that outlook received it. After processed there is another level of delivered. Does it say in your sendgrid activity log that it was delivered. It might say not and outlook refused it because they think one email after the other might be spam. (Keep this in mind when sendgrid sends emails it doesnt come from your email address, and some might mark that as spam)

Related

Can I reply my own mails with PHPMailer, that's possible?

I need a information about PHPMailer about replying my own mails.
I need send a empty mail(subject, body), and when the first mail sent second mail need sending with replying first mail.
That's possible ?
I tried but never can repyling my own mails.
Yes, but PHPMailer won't do this for you. You will need to do it by getting and setting appropriate headers, in particular the Message-ID header that identifies each message, and the In-Reply-To and References headers which are used to track whether something is a reply. Probably the best way to see these working is to simulate it using your regular email client - Outlook, Gmail, Apple Mail – all of which will set those headers correctly.

Seeing a lot of SendGrid Activity marked "Deferred" after disabling a mailbox

Using SendGrid through Azure (free version).
I recently disabled a user's email because it was receiving way too much SPAM. Prior to doing this my activities list was about 1-2 pages long with recognizable e-mails my system was sending out per customer input in a website (there is a workflow for forms which the user inputs, then my system sends out an e-mail confirming input).
Now that I have disabled that e-mail, I am seeing upwards of 59 pages of activity just for one day (since I disabled the e-mail address), most of which is listed as "Deferred" or "Processed". The lists include SPAM e-mail addresses (something-reverse-mortgage#whatever.net, etc.).
Reading the SendGrid documentation, it seems that "Deferred" activities just mean that the receiving ISP is asking SendGrid to slow down. I take this to mean that my server is sending these e-mails.
This is worrisome obviously. Disabling that e-mail has this unintended consequence of seeing hundreds of "Defered" activity listings in SendGrid.
I am confused, however, if this is just the system getting these e-mails and then trying to bounce them back through my server. Since it's SPAM and likely not a real e-mail address, is SendGrid just trying to return the e-mails? Hence the activity?
If so, is this something that will eventually die down, or should I do something to prevent SendGrid from returning these obviously bogus SPAM e-mails to what it thinks is the originating sender?
Thanks in advance.
I send about 100K emails a month with sendgrid and I don't worry at all about deferred. About 1/3 of my outgoing emails are gmail and gmail is very agressive at blocking emails when you send more than 50 or so at once. They simply reject and sendgrid tries again later. They all seem to go thru within about 24 hours.

Sending iCalendar to an user who's also the organizer of the event

I'm working on a C# application that sends emails containing a vCalendar event in its body. Say I (knockycode) would like to create a calendar event via this application. An email will be sent to my email address with the following body:
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:-//MyCompany//Product//EN
VERSION:2.0
BEGIN:VEVENT
DTSTAMP:20130819T084518Z
DTSTART:20051126T011300Z
SUMMARY:Testing that calendars get received
UID:MyOwnID
SEQUENCE:123
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="knockycode#lotusnotes.com":MAILTO:knockycode#lotusnotes.com
ORGANIZER;CN="Knockycode":MAILTO:knockycode#lotusnotes.com
LOCATION:TBC
DTEND:20051126T031300Z
DESCRIPTION:Some Body\NAnother Line of the body
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT02H30M00S
END:VALARM
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
Take note that the organizer and the attendee is one and the same. This is so the organizer (me/knockycode) can actually have the event created on my mail client.
On Exchange/Outlook and gmail, the email is received (and I can RSVP to the event).
However, on Domino/Lotus Notes -- the email is not received (i.e. not shown in my mailbox). Though the logs in the Domino console do say the email's sent successfully.... If the organizer's email address was different to mine though -- the email does get received and shown in my mailbox.
Is there some configuration of the Domino server that would allow this email to be received?
Or something else has to be added to the email body?
I think this per your last comment is working as designed. The ICS will just get you a notice on the calendar. I would go back to the Exchange side and use a new meeting form to get all the elements for interaction. If you pass a meeting notice to a Notes user (depending on the version that the client is using) from Exchange you can send invites out of the box. Notes can send replies back successfully in some instances. The issue might come up with reschedules and meeting cancels. These don't play well between systems well. Then you might run your present code to pass a ICS at the time of meeting change time/location. I would see how things work first then write your code. The ICS file will also work under remote devices like Apple iPhone/iPad.

How to prevent emails from a specific address going to Hotmail SPAM?

I have a site on a dedicated server with it's own IP range that has been running for a good few years. We have a notification email address (mailout#domain.com) which we use to send automated emails (activation emails when a user signs up and notification emails if something relevant to them happens, eg someone befriends them or comments on their picture etc). Users can select whether to receive these notifications or not. We have SPF and RDNS setup.
Email from all our other email accounts go to hotmail/gmail/yahoo mail etc correctly into the inbox. However any mail sent from the mailout#domain.com account (whether automatically by the server or manually via outlook) is delivered correctly to the inboxes for yahoo and gmail however goes into Junk in Hotmail (but other #domain.com addresses deliver to hotmail's inbox correctly). It says at the top of the message that MS Smartscreen marked this message as junk. I signed up for MS Smart Network Data Services to monitor the IP and it says it's not blocked but it displays Bot-like behaviour (which kind of makes sense as our notifications are kind of bot like even though they're not spam).
I can't work out what to do to prevent this from happening, we've authenticated the email, there's obviously not a general block on the IP as emails from different accounts on the same domain are going through successfully. It doesn't seem to be the format of the email either because if I send identical emails from mailout#domain.com and contact#domain then the one from contact# gets through to the inbox but the one from mailout# goes through to junk.
I can't really work out what to do and obviously trying to get MS to sort it out is never going to happen and i've used all their available tools. I can obviously try setting up a new email address (eg noreply#domain.com) and using that for notifications but i assume it will only be a matter of time before that gets blocked as well.
I would be immensely grateful for any suggestions anyone has!
Thanks so much,
Dave
You don't have many options. Try to do as many of the following as you can:
Reach out to MS support (don't discard this notion)
Implement DKIM and possibly DMARC (which are vastly more informative than SPF)
Change your IP address to something cleaner
Find and follow bulk sender best practices, e.g. M³AAWG's BCPs, perhaps the Help – I'm on a Blocklist doc

Why does email need an envelope, and what does the "envelope" mean?

What is the exact difference between the envelope and the email in smtp?
Why does the protocol need the envelope? In snail mail, the letter needs not contain addresses and is not visible to the postman (at least that's what you want to believe), so all the routing is made entirely based on the envelope and that is clear to me.
However in e-mail, the letter itself is parseable and has headers such as From: and To:. Why is that not enough to route email? Why do we need an envelope?
And what is the meaning of a divergence between the envelope and the email itself? Does it necessarily mean that someone is trying to game the system, or is it, under certain circumstances (what circumstances?), legal to have a difference between them.
Your clarifications are more than welcome.
Puzzled email receiver.
The recipient address in the SMTP RCPT TO: command is what mail transports use to determine the actual recipient of an email. The addresses in the To: and Cc: headers are there for mail readers to display to users who the recipients are, but they're not actually used by mail transports.
Most mail clients set the same addresses in SMTP RCPT TO: and MAIL FROM: commands that they insert in To:, Cc:, and From: headers, so the "envelope" addresses will be the same as the addresses in the headers.
Envelope and header addresses will usually agree for most legitimate mail. Notable exceptions are Bcc: addresses and mailing lists.
Spammers often forge header addresses to try to avoid spam filters.
The bottom line is that the overhead would be too great. When mail servers are processing millions of messages per day, it's much faster during the SMTP session (The Envelope) when the mail server can process individual commands.
If you didn't use an Envelope, you would have to push the entire message at the SMTP server, before you could find out if the message needs to be rejected. Some messages are quite large (I've seen 100+Meg messages working with GIS images).
By using an Envelope, we can issue specific 1 line commands against the mail server, and the mail server will tell us if we are successful or not, right then and there.
The envelope is used by the SMTP server and the message headers are used by a mail reader as everyone else has said.
What has not been said is that the RCPT TO: is used to route the message to a specific user regardless of where the user's name appears in the headers. The user does not necessarily need to appear in the To: or even the Cc: headers. Think of a Bcc: where the only thing that the receiver knows is who the message was from. In this case, the To: and CC: headers should be empty - hence the blind part of BCC. In another case, if an email message has the user mentioned in the CC list along with 10 other users, how can the SMTP routing pick the appropriate user. The answer is that it uses the RCPT line to route the message.
This is also used when routing via mailing lists. The To: header will contain the mailing list e-mail address. An SMTP system will generate separate messages for each user in the list each with a specific RCPT TO: user#host... envelope. In this case, the user's name will not even appear in any of the other headers.
An email message is very similar to a physical letter that you would send in the mail. There is an envelope, with To/From information, and there is the actual letter on the inside, with it's own To/From information. The envelope to/from information is the real information that is used for message delivery, for both email servers and post offices.
When an envelope comes into a post office, they inspect the To address on the envelope, and send it to the correct destination. The post office workers have no knowledge of the letter inside the envelope. The letting inside could have completely different To/From information than the envelope says. The Envelope could say the message is to Bob, but the letter inside may say it's for Alice. Or in real world: The envelope could say the message is to SomeCompanyName, and when secretary open envelope, letter inside say, it's is for Mr. Brown which work in SomeCompanyName.
Source: Email Envelope vs Email Header

Resources