CodeIgniter Forums

Full Version: Email can't send
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
can I send an email without SMTP on the current codeigniter version?
what I'm trying right now is to send an email with Gmail's SMTP and succeed. however, when I did not set the configuration of the email library, the email was not sent even though there was no error message. whereas, in version 2.x it can send emails even without configuring the email library. can anyone help me solve this? or can anyone give me information about the email library in Codeigniter 3, is there really a change from the email library in version 2.x? Thank you in advance...  Smile
Sending email that passes all the tests to be declared legit is tricky business. Sending email without SMTP always gives you +1 for being considered spam. That aside, I've also noticed problems sending email with CodeIgniter. I switched to SwiftMailer for that reason. Swiftmailer is not hard to use. https://swiftmailer.symfony.com/
To see the error message, you need to send email with FALSE attribute:
PHP Code:
$this->email->send(false); 

Also thing to note about emails, even if the send action is successful, usually the bottle-neck is other email servers flagging the email as spam. This, most of the time, is down to using shared hosting or not adding necessary meta-data to DNS records. I won't pretend I understand it fully, as I'm not sys admin, but worth checking your inbox server spam filters.

I use my mates hosting company, and they have some pretty mean spam filters that completely stop emails going through - stuff like Humble Bundle for example, so I had to browse through server side archive trying to fix it or whitelist 3rd party suppliers.

It obviously doesn't help when you have to tell clients to change their filters, but sometimes you might see a reason it gets flagged as spam, and can fix it on your code / server/email/DNS settings side to give you the best chance.