Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sendgrid - SMTP or CURL?

We are setting up a bulk mailing system using sendgrid as our core.

We are managing the lists ourselves and sendgrid is simply our transport and are using code igniter to build the system.

We are wondering what you would recommend we use, sendgrid as an smtp server, or use it's curl API.

We are sending emails out to x00,000 people every day, the emails all have the same content.

We have found SendGrid's integration documentation for code igniter which only has smtp examples, so possibly that is the way to go?

The other part of the question is, if we were to go with the SMTP api, how does code igniters bcc_batch_mode work?

like image 825
Hailwood Avatar asked May 31 '11 21:05

Hailwood


People also ask

Does SendGrid use SMTP?

SendGrid provides an SMTP service that allows you to deliver your email via our servers instead of your own client or server. This means you can count on SendGrid's delivery at scale for your SMTP needs.

Is SendGrid an email provider?

SendGrid is a cloud-based SMTP provider that allows you to send email without having to maintain email servers. SendGrid manages all of the technical details, from scaling the infrastructure to ISP outreach and reputation monitoring to whitelist services and real time analytics.


2 Answers

I currently work at SendGrid. Our web API actually works faster than SMTP, as you only need to make a single cURL request to us to send a message, whereas with SMTP there's a lot of back-and-forth TCP chatter for connection, HELO, and such.

We recently published a new PHP library, you can find it on our github account: http://github.com/sendgrid/

Don't hesitate to contact us if you have questions.

like image 162
iandouglas Avatar answered Oct 31 '22 23:10

iandouglas


Reading the documentation at http://sendgrid.com/documentation/map/version/v2#api there is little to choose between them. All functionality is available either way. For PHP, I recommend smtp server with their SMTP API to take advantage of existing libraries that correctly format, mime encode, and send the email. Notably, example PHP code is given only for the SMTP API.

Edited for additions to question

The sendgrid documentation say to encode multiple recipients with their API in a custom mail header -- X-SMTPAPI --not using CC and BCC. See http://sendgrid.com/documentation/display/api/SMTPDevelopersGuide

http://sendgrid.com/documentation/display/api/SMTP best practices section for issue with multiple recipients in the regular mail headers.

like image 33
Magicianeer Avatar answered Nov 01 '22 00:11

Magicianeer