How to send emails if your hosting provider does not allow SMTP relay? How to send emails if your hosting provider does not allow SMTP relay? codeigniter codeigniter

How to send emails if your hosting provider does not allow SMTP relay?


You can use alternate ports with SendGrid:

Many hosting providers and ISPs block port 25 as a default practice. When trying to connect to smtp.sendgrid.net remember that ports 25, 2525, 587, and 465 are all available for use. You can connect via unencrypted or TLS on ports 25, 2525, and 587. You can connect via SSL on port 465.

-- http://docs.sendgrid.com/documentation/get-started/smtp-ports/


You should use the SendGrid web API to send emails. If you're ISP is blocking email, then your best bet is to switch to HTTP. It's a pretty simple switch since it takes all the same parameters. Check out the docs for more info:

http://docs.sendgrid.com/documentation/api/web-api/mail/#send

And I doubt it will work with the CI email library, but there's no reason you can't just use the SendGrid library:

https://github.com/sendgrid/sendgrid-php


Also, this CodeIgniter library sends SendGrid email via HTTP. Might be worth checking out.