Email Not Sending (SMTP) |
[eluser]Popcorn[/eluser]
Hello ![]() Using ASmallOrange as hosts. Code: 220-christian.asmallorange.com ESMTP Exim 4.69 #1 Mon, 25 Aug 2008 20:16:45 -0400 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. And using these smtp settings Code: $config['auth']['mail']['mailtype'] = 'html'; Any help is appreciated.
[eluser]Unknown[/eluser]
I was having the same problem with HostGator (by the way, very good hosting service in my opinion!) Finally I found the _smtp_authenticate() function was not running because of a variable set to FALSE system/libraries/Email.php file, line 60: var $_smtp_auth = TRUE; I really hope this could be helpful to you. Bye, DAvide
[eluser]Derek Jones[/eluser]
$_smtp_auth would be set to TRUE automatically if $this->smpt_user and $this->smtp_pass are set.
[eluser]Unknown[/eluser]
You just need to initialize the email class in a different way. The documentation does not say this, but instead of: Code: $this->load->library('email'); Code: $this->load->library('email', $config); HTH, Sorin
[eluser]Derek Jones[/eluser]
You can do it either way, Sorin, the end result will be the same. Email::initialize() is what the constructor uses when you pass it while loading the library.
[eluser]Mat-Moo[/eluser]
Looking at http://wiki.asmallorange.com/Email the username should be in the format [email protected] - try - [email protected].... and see if it works. Edit: Sorry didn't realise this was such an old thread!
[eluser]webthink[/eluser]
Actually, I think sorinv is right, there is indeed a bug here. One of our server's was just (yesterday) upgraded, and one of the patches closed an open relay SMTP issue. Our codeigniter app could not send email. Debugging, I found that the constructor of the email library was getting empty strings, instead of the smtp info set by config. Changing to $this->load->library('email', $config); solved the problem. I don't really have time to look in detail, but I think the problem is that $_smtp_auth gets set to false when the library is loaded, and initialize doesn't change that. EDIT: I can see that v1.7 fixes this, as it explicitly resets $this->_smtp_auth on line 129. So this bug is only for older versions of CodeIgniter. To help people searching ... This was on a plesk server running qmail. The error was "553 sorry, that domain isn't in my list of allowed rcpthosts"
[eluser]Derek Jones[/eluser]
Thanks webthink; it's always important when reporting bugs to be using the most up to date version of CI, or failing that, at least mentioning which version is in use, and I should have asked these users, but I bet that's the problem.
[eluser]Spir[/eluser]
i'm using last CI version and I send mail using SMTP. I had an issue as well saying I have to check that page : http://cr.yp.to/docs/smtplf.html I notice my config wasn't setup. The default one was used. Code: <?php the solution was to add Code: $this->email->set_newline("\r\n"); |
Welcome Guest, Not a member yet? Register Sign In |