Thursday, August 17, 2023
HomeEmail MarketingInternet API vs SMTP Relay: How Ought to You Ship Your E-mail?

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


SendGrid’s Internet API and SMTP Relay are the 2 major strategies of integrating with and sending e-mail by way of SendGrid. You’ll be able to consider their variations like strategies of delivering a package deal: you can ship a package deal within the mail, or you can drive it to the vacation spot your self.

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

Internet API

SendGrid’s Internet 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 all the pieces is packaged appropriately, SendGrid can course of the request after which ship it to the supposed 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 package deal within the mailbox and letting the publish workplace assessment its info 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 implies that the ISP has decided the handle is legitimate and has accepted the message. As soon as accepted, the ISP then determines if it must be positioned within the inbox, junk folder, spam folder, or defer the message all collectively.

You’ll be able to 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 supposed recipient than the Internet API. In our instance, this technique is extra like delivering a package deal your self as a result of it requires further steps to finish the supply course of. When a sender makes use of SMTP to hook up with SendGrid, separate items of data should be handed backwards and forwards between SendGrid and its clients earlier than the message could be processed and despatched to the recipient ISP.

With SMTP, SendGrid has to examine 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. The same dialog has to happen between SendGrid and the receiving ISP earlier than the ISP can determine whether or not it’s going to ship, block, or ship the e-mail to the spam folder.

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

SMTP vs. API

Due to the additional “chatter” backwards and forwards throughout an SMTP connection, we propose that SendGrid clients use the Internet API when potential 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 would trigger a type of “not okay” messages.
  • The Internet API is quicker. The additional backwards and forwards obligatory 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 Internet API additionally permits you to add an additional layer of safety to your program by using API keys. API keys let you generate an authentication credential separate out of your username password, which considerably lowers the possibility of somebody utilizing your account to ship spam or phish.

That being mentioned, SMTP is an e-mail commonplace and is used universally. The Internet API was created by SendGrid’s founders to attach with our system extra effectively and may not be a viable choice 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 Internet 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.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments