EllisLab text mark
Advanced Search
     
Email Not Sending (SMTP)
Posted: 25 August 2008 09:25 PM   [ Ignore ]
Joined: 2007-11-08
237 posts

Hello smile

Using ASmallOrange as hosts.

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.

hello250-christian.asmallorange.com Hello christian.asmallorange.com [64.22.96.74]
250
-SIZE 52428800
250
-PIPELINING
250
-AUTH PLAIN LOGIN
250
-STARTTLS
250 HELP

from
250 OK

to
550-christian.asmallorange.com (www.leveldesign.info[64.22.96.74]:41462 is
550
-currently not permitted to relay through this serverPerhaps you have not
550
-logged into the pop/imap server in the last 30 minutes or do not have SMTP
550 Authentication turned on in your email client
.

The following SMTP error was encountered550-christian.asmallorange.com (www.leveldesign.info[64.22.96.74]:41462 is 550-currently not permitted to relay through this serverPerhaps you have not 550-logged into the pop/imap server in the last 30 minutes or do not have SMTP 550 Authentication turned on in your email client.

data503-All RCPT commands were rejected with this error:
503-christian.asmallorange.com (www.leveldesign.info[64.22.96.74]:41462 is
503
-currently not permitted to relay through this serverPerhaps you have not
503
-logged into the pop/imap server in the last 30 minutes or do not have SMTP
503
-Authentication turned on in your email client.
503 Valid RCPT command must precede DATA

The following SMTP error was encountered
503-All RCPT commands were rejected with this error503-christian.asmallorange.com (www.leveldesign.info[64.22.96.74]:41462 is 503-currently not permitted to relay through this serverPerhaps you have not 503-logged into the pop/imap server in the last 30 minutes or do not have SMTP 503-Authentication turned on in your email client503 Valid RCPT command must precede DATA
500 unrecognized command
The following SMTP error was encountered
500 unrecognized command
Unable to send email using PHP SMTP
Your server might not be configured to send mail using this method.

User-AgentCodeIgniter
Date
Mon25 Aug 2008 20:16:45 -0400
From
"Mathew" 
Return-Path
Toleveldesign.info@gmail.com
Subject
http://www.favourbank.com/ Forgotten Password Request
Reply-To"mathew@leveldesign.info" 
X-Sendermathew@leveldesign.info
X
-MailerCodeIgniter
X
-Priority(Normal)
Message-ID: <48b34b6d97f0d@leveldesign.info>
Mime-Version1.0


Content
-Typemultipart/alternativeboundary="B_ALT_48b34b6d982f5"
This is a multi-part message in MIME format.
Your email application may not support this format.

--
B_ALT_48b34b6d982f5
Content
-Typetext/plaincharset=utf-8
Content
-Transfer-Encoding8bit

Forgotten Password Request
Your verification code is 
: *************
Please visit the verification page to proceed.


--
B_ALT_48b34b6d982f5
Content
-Typetext/htmlcharset=utf-8
Content
-Transfer-Encodingquoted-printable


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
>
<
html>
    <
head>
    =
00
    
</head>
    <
body>
        <
h2>Forgotten Password Request</h2>
        <
p>Your verification code is : *******</=
p>
        <
p>Please visit the <>verification </a>page to proceed.</p>
    </
body>
</
html>

--
B_ALT_48b34b6d982f5-- 

And using these smtp settings

$config['auth']['mail']['mailtype']        'html';
$config['auth']['mail']['protocol']     'smtp';
$config['auth']['mail']['smtp_host']     'mail.leveldesign.info'
$config['auth']['mail']['smtp_user']     'leveldes';
$config['auth']['mail']['smtp_pass']     '**********'
$config['auth']['mail']['smtp_port']     '26'

Any help is appreciated.

 Signature 

Redux Auth is no longer maintained.

 
Posted: 17 September 2008 09:08 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2008-07-19
9 posts

PopCorn,


I have same problem. Did you fix it?

 
Posted: 22 October 2008 05:55 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2008-03-27
1 posts

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

 
Posted: 24 October 2008 11:48 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2002-06-03
6432 posts

$_smtp_auth would be set to TRUE automatically if $this->smpt_user and $this->smtp_pass are set.

 
Posted: 28 October 2008 01:09 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2008-10-28
1 posts

You just need to initialize the email class in a different way. The documentation does not say this, but instead of:

$this->load->library('email');
$this->email->initialize($config); 

you need to do:

$this->load->library('email'$config); 

HTH,
Sorin

 
Posted: 28 October 2008 01:38 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2002-06-03
6432 posts

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.

 
Posted: 28 October 2008 04:58 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2008-10-20
397 posts

Looking at http://wiki.asmallorange.com/Email the username should be in the format .(JavaScript must be enabled to view this email address) - try - .(JavaScript must be enabled to view this email address).... and see if it works.

Edit: Sorry didn’t realise this was such an old thread!

 Signature 

Mat-Moo
Image moo - the easy to use image library!
MatMoo.com!
E-Mail Remind - Free reminders by email
Printfetti - Your photos on confetti!

 
Posted: 29 October 2008 10:00 AM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2008-02-25
174 posts

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”

 Signature 

Webthink.ca - a CodeIgniter/Kohana Shop

 
Posted: 29 October 2008 10:19 AM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2002-06-03
6432 posts

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.

 
Posted: 05 March 2009 08:20 AM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2008-10-15
147 posts

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.

<?php
class TestMail extends Controller {
    
    
    
function TestMail() {
        parent
::Controller();
    
}
    
    
function index(){
        $config[
'useragent''test'// The "user agent".
        
$config['protocol''smtp'// mail, sendmail, or smtp    The mail sending protocol.
        
$config['mailpath'''// The server path to Sendmail.
        
$config['smtp_host''myserver'// SMTP Server Address.
        
$config['smtp_user'''// SMTP Username.
        
$config['smtp_pass'''// SMTP Password.
        
$config['smtp_port''25'// SMTP Port.
        
$config['smtp_timeout''5'// SMTP Timeout (in seconds).
        
$config['wordwrap'TRUE// TRUE or FALSE (boolean)    Enable word-wrap.
        
$config['wrapchars'76// Character count to wrap at.
        
$config['mailtype''html'// text or html Type of mail. If you send HTML email you must send it as a complete web page. Make sure you don't have any relative links or relative image paths otherwise they will not work.
        
$config['charset''utf-8'// Character set (utf-8, iso-8859-1, etc.).
        
$config['validate'FALSE// TRUE or FALSE (boolean)    Whether to validate the email address.
        
$config['priority'3// 1, 2, 3, 4, 5    Email Priority. 1 = highest. 5 = lowest. 3 = normal.
        
$config['crlf''\r\n'// "\r\n" or "\n" or "\r" Newline character. (Use "\r\n" to comply with RFC 822).
        
$config['newline''\r\n'// "\r\n" or "\n" or "\r"    Newline character. (Use "\r\n" to comply with RFC 822).
        
$config['bcc_batch_mode'FALSE// TRUE or FALSE (boolean)    Enable BCC Batch Mode.
        
$config['bcc_batch_size'200// Number of emails in each BCC batch.

        
$this->load->library('email');
        
$this->email->initialize($config);

        
$list = array('you@myProvider.com''me@myProvider.com');


        
$this->email->from('me@myProvider.com''Me');
        
$this->email->reply_to('me@myProvider.com''Me');
        
$this->email->to($list);
        
$this->email->subject('testing my mail function with CodeIgniter');
        
$this->email->message('<html><body>this is the content</body></html>');
        
$this->email->attach('./img/layout/someImage.jpg');
        
        if ( ! 
$this->email->send()){
            
echo 'error! <br />';
            
// Generate error
        
}
        
echo $this->email->print_debugger();
    
}    
}
?> 

the solution was to add

$this->email->set_newline("\r\n"); 

right after the call for the initialize function. Since it seems initialize don’t do the job (don’t know why).

 
Posted: 05 March 2009 08:21 AM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2008-10-15
147 posts

And by the way if I put

$this->load->library('email'$config); 

then it load sendmail (not smtp) so it doesn’t take care of my config at all.

 
Posted: 24 July 2009 06:23 AM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Joined: 2009-07-24
3 posts

Thanks Spir!. Adding ‘$this->email->set_newline(”\r\n”);’  did the trick.

 
Posted: 08 November 2010 12:35 PM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Joined: 2008-08-21
8 posts

Spir: I know this is quite a time later but I had the same issue.

I believe that the real cause is using single quotes around the \r\n. Using PHP double quotes evaluate variables and control characters (e.g. \n or \r), whereas single quotes do not.

Where you are setting up the config array you are using single quotes:

$config['crlf''\r\n'

It should be double quotes:

$config['crlf'"\r\n"
 
Posted: 11 December 2010 08:55 AM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Joined: 2010-05-10
7 posts

hi all
now what is the correct solution

 
Posted: 19 September 2011 09:55 AM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Joined: 2011-04-27
1 posts

just do:
$config[‘smtp_port’] = 465;
$config[‘newline’] = “\r\n”;

 
Posted: 02 October 2012 06:26 PM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Joined: 2012-10-02
1 posts

Hello… Today after research so mucho and spend all the day… I’m hosting with justhost, and It’s seem that the hosting make you to write the mail with a valid mail from the domain… check the way to config a client from your mail server and that’s it

my domain is xinerk.net

$config[‘protocol’]=‘smtp’;
$config[‘smtp_host’]=‘mail.xinerk.net’;
$config[‘smtp_port’]=‘26’;
$config[‘smtp_user’]=‘rem…@xinerk.net’;
$config[‘smtp_pass’]=‘L1fq…’;
$config[‘validate’] = ‘false’;
$config[‘wordwrap’] = TRUE;
$config[‘mailtype’]=“html”;
$config[‘charset’]=‘utf-8’;
$config[‘newline’]=”\r\n”;
$config[‘alt_message’]=“Mensaje de SiSP”;
$config[‘crlf’] = “\r\n”;
$config[‘newline’] = “\r\n”;
$config[‘smtp_timeout’]=‘30’;