CodeIgniter Forums
SMTP authentification miss a parameter? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: SMTP authentification miss a parameter? (/showthread.php?tid=8265)

Pages: 1 2 3


SMTP authentification miss a parameter? - El Forum - 05-12-2008

[eluser]sophistry[/eluser]
post code.


SMTP authentification miss a parameter? - El Forum - 05-12-2008

[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:
Code:
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:
Code:
$this->load->library('email');

// 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->initialize($config);

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

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



SMTP authentification miss a parameter? - El Forum - 05-12-2008

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


SMTP authentification miss a parameter? - El Forum - 05-12-2008

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


SMTP authentification miss a parameter? - El Forum - 05-12-2008

[eluser]sophistry[/eluser]
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:

http://www.ietf.org/rfc/rfc2476.txt

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?


SMTP authentification miss a parameter? - El Forum - 05-12-2008

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


SMTP authentification miss a parameter? - El Forum - 05-12-2008

[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.


SMTP authentification miss a parameter? - El Forum - 05-29-2008

[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?


SMTP authentification miss a parameter? - El Forum - 05-31-2008

[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.


SMTP authentification miss a parameter? - El Forum - 05-31-2008

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