sKunKbad Posted November 30, 2009 Share Posted November 30, 2009 This question may not just be a CodeIgniter related question, but since I am working with CodeIgniter, the context of the question was how I determined where to post. CodeIgniter has an email class, and when using it, it defaults to 'mail' as the protocol. Other options are 'sendmail' and 'stmp'. In my adventures with CodeIgniter, I've never had to configure this option, but on my most recent project, sending email was doing VERY buggy things. Through trial and error, I found that changing the protocol to sendmail was all that was needed to be done to fix everything. What's really weird is that 'mail' would send standard email most of the time, but would never send html email. Also, mail delivery was totally random, and Google wouldn't accept the mail no matter what I did. I was even getting a confirmation (success) message when I used 'mail', so I never thought to change the protocol until a lot of time went by. I initially thought that there was some other problem, like with my controller, or the email content view. Is there a way to look at PHP info and know right away if the server uses mail vs. sendmail ??? I don't want to have to waste so much time with this again! Quote Link to comment https://forums.phpfreaks.com/topic/183482-how-to-know-which-email-protocol-to-use-w-codeigniter/ Share on other sites More sharing options...
ganny Posted December 22, 2009 Share Posted December 22, 2009 You'll need to know the server and network configuration to know which to use. First of all, CodeIgniter is IMO making a mistake when calling these "protocols". Secondly, I can't see what they mean by "mail" protocol, tried reading here: http://codeigniter.com/user_guide/libraries/email.html Sendmail uses the built in sendmail (usually /var/lib/sendmail) executable on the system to hand the mail over to the server, thereby letting the server deliver the mail on. SMTP delivers the mail directly to some relaying or recipient server using the SMTP protocol. But what is mail? Perhaps it tries to look up MX records for the recipient mail server and deliver the mail directly. Sounds like a really bad idea to me - your web server will most likely be blocked by many recipients as a likely source of spam (ie. untrusted mail server on a variety of metrics). I'd use sendmail if you know the server setup is OK, otherwise SMTP through a mail server you trust. A benefit of sendmail over SMTP is that if there is an issue delivering mail on, the local server will queue and retry the mail, usually up to a week. If the SMTP fails, you have to retry yourself, or just give up. Quote Link to comment https://forums.phpfreaks.com/topic/183482-how-to-know-which-email-protocol-to-use-w-codeigniter/#findComment-982281 Share on other sites More sharing options...
dominicd Posted January 15, 2010 Share Posted January 15, 2010 Not to hijack this thread but Say wordpress is able to send emails with out any "valid" mailboxes. out of the box it will send out registration emails. How does that do it and how to impliment it in CI wouldnt it just be a send form without a specified mailbox? Quote Link to comment https://forums.phpfreaks.com/topic/183482-how-to-know-which-email-protocol-to-use-w-codeigniter/#findComment-995571 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.