• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SMTP authentification miss a parameter?

post code.

[eluser]Référencement Google[/eluser]
I will try to reconstruct the code part that may cause the problem, (actually this is in several files):

In a config file:
define('MAIL_SITE', '[email protected]');
define('SMTP_HOST', 'mail.mydomain.com');
define('SMTP_USER', 'my_smtp_user'); // Real username and password in my scripts are correct and I am sure about it
define('SMTP_PASS', 'my_smtp_pass');
define('SMTP_PORT', 587); // I am sure about this, don't ask me why the port is not 25

Then this config file is loaded in a library that do this:

// Set the default email config and Initialize
$config['protocol']  = 'smtp';
$config['smtp_host'] = SMTP_HOST;
$config['smtp_user'] = SMTP_USER;
$config['smtp_pass'] = SMTP_PASS;
$config['smtp_port'] = SMTP_PORT;
$config['mailtype']  = 'html';

$this->email->from('[email protected]', 'Sender Name');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');

if( ! $this->CI->email->send())
    echo $this->email->print_debugger();
    echo "Email sent";

[eluser]Derek Jones[/eluser]
Port 587 is SMTP with STARTTLS, i.e. it's using SSL.

[eluser]Référencement Google[/eluser]
mmm, ok I see. So this is a feature request then and not anymore a bug.

hmmmnnn, interesting. port 587? i googled smtp port 587 and found rfc2476 which says some things about how these types of mailservers (listening on port 587) can be configured:


Quote:3.2. Message Rejection and Bouncing

MTAs and MSAs MAY implement message rejection rules that rely in part
on whether the message is a submission or a relay.

For example, some sites might configure their MTA to reject all RCPT
TOs for messages that do not reference local users, and configure
their MSA to reject all message submissions that do not come from
authorized users, based on IP address, or authenticated identity.

NOTE: It is better to reject a message than to risk sending one that
is damaged. This is especially true for problems that are
correctable by the MUA, for example, an invalid 'From' field.

If an MSA is not able to determine a return path to the submitting
user, from a valid MAIL FROM, a valid source IP address, or based on
authenticated identity, then the MSA SHOULD immediately reject the
message. A message can be immediately rejected by returning a 550
code to the MAIL FROM command.

does that sound familiar?

so, who is running your mailserver? can you get the log to see what it says there?

so it was SSL all along... that's why posting code up front is better. ;-)

[eluser]Référencement Google[/eluser]
Quote:so, who is running your mailserver? can you get the log to see what it says there?

Unfortunately not, this is on a shared host and I don't have nothing more access than the FTP and MySQL settings. Anyway thanks for helping.

[eluser]Référencement Google[/eluser]
After seing this post: http://ellislab.com/forums/viewthread/80776/

I have made some tests and that's exactly the bug. Changing things how he said does the trick and it worked perfectly even with my port 587

Do you want me to fill a bug report?

[eluser]Derek Jones[/eluser]
[quote author="elitemedia" date="1212114946"]Do you want me to fill a bug report?[/quote]

Yes, please, so it will be tracked and documented.

[eluser]Référencement Google[/eluser]
Done: http://codeigniter.com/bug_tracker/bug/4615/

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.