Thursday, August 17, 2023
HomeEmail MarketingNet API vs SMTP Relay: How Ought to You Ship Your E...

Net API vs SMTP Relay: How Ought to You Ship Your E mail?


SendGrid’s Net API and SMTP Relay are the 2 main strategies of integrating with and sending e mail by means of SendGrid. You may consider their variations like strategies of delivering a bundle: you would ship a bundle within the mail, or you would drive it to the vacation spot your self.

Whereas the strategies of supply are totally different, the tip consequence is similar: the bundle is acquired. Under, we’ll stroll you thru the ins and outs of our API vs. SMTP sending strategies.

Net API

SendGrid’s Net API sends mail by way of HTTP. Your server sends a message to SendGrid, and receives both a 250 message, indicating that the message was accepted by the receiving server, or a 400 or 500 message, indicating that one thing is improper, prohibiting us from processing the request.

When every part is packaged accurately, SendGrid can course of the request after which ship it to the meant recipient’s ISP that responds with both a 250 message or a 500 message of their very own, informing SendGrid whether or not or not the message was acquired. This course of is extra just like placing your bundle within the mailbox and letting the publish workplace evaluation its data and ship it for you.

Reminder: A 250 message out of your recipient’s ISP does not assure that the e-mail will attain their inbox—it signifies that the ISP has decided the handle is legitimate and has accepted the message. As soon as accepted, the ISP then determines if it ought to be positioned within the inbox, junk folder, spam folder, or defer the message all collectively.

You may be taught extra in regards to the server response messages in our e mail error messages glossary entry.

SMTP relay

Sending e mail by way of SMTP relay, or Easy Mail Switch Protocol, requires extra backwards and forwards dialog to ship a message to the meant recipient than the Net API. In our instance, this technique is extra like delivering a bundle your self as a result of it requires extra steps to finish the supply course of. When a sender makes use of SMTP to hook up with SendGrid, separate items of knowledge should be handed backwards and forwards between SendGrid and its prospects earlier than the message will be processed and despatched to the recipient ISP.

With SMTP, SendGrid has to test the message, DNS, and authentication. Every of these will return a 250 message or a 400 or 500 message indicating that one thing is true or improper individually. An identical dialog has to happen between SendGrid and the receiving ISP earlier than the ISP can resolve whether or not it’s going to ship, block, or ship the e-mail to the spam folder.

Learn an in-depth rationalization of SMTP Relay in our weblog publish E mail Message Stream 101.

SMTP vs. API

Due to the additional “chatter” backwards and forwards throughout an SMTP connection, we advise that SendGrid prospects use the Net API when doable for a number of causes:

  • SMTP relay creates a number of factors of potential failure, that means that there are extra locations within the dialog between the sender and SendGrid that might trigger a type of “not okay” messages.
  • The Net API is quicker. The additional backwards and forwards mandatory in SMTP relay may cause some (minimal) latency for purchasers who’re outdoors of the US, and thus farther from our inbound knowledge facilities.
  • The Net API additionally lets you add an additional layer of safety to your program by using API keys. API keys help you generate an authentication credential separate out of your username password, which considerably lowers the prospect of somebody utilizing your account to ship spam or phish.

That being stated, SMTP is an e mail customary and is used universally. The Net API was created by SendGrid’s founders to attach with our system extra effectively and won’t be a viable possibility for all customers. SMTP relay may also be used to attach with an present software like a CRM system or a mail shopper like Outlook. The Net API is commonly utilized by builders creating their very own merchandise.

To learn extra about SendGrid’s e mail instruments and options, head over to our Documentation.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments