-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Establish STARTTLS connection without authentication #17
Conversation
For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials.
Is there anyone who can do a code-review and merge this request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks sane to me. Maybe @alecpl has thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please describe the new option in the constructor doc. It need to be noted somewhere that the option requires Net_SMTP 1.10.0.
Mail/smtp.php
Outdated
@@ -402,6 +415,16 @@ public function getSMTPObject() | |||
return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_AUTH); | |||
} | |||
} | |||
|
|||
/* Attempt to establishe a TLS encrypted connection. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"establishe" -> "establish".
Mail/smtp.php
Outdated
@@ -402,6 +415,16 @@ public function getSMTPObject() | |||
return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_AUTH); | |||
} | |||
} | |||
|
|||
/* Attempt to establishe a TLS encrypted connection. */ | |||
if ($this->starttls && $this->auth === False) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be better to do just !$this->auth
here.
Mail/smtp.php
Outdated
/* Attempt to establishe a TLS encrypted connection. */ | ||
if ($this->starttls && $this->auth === False) { | ||
$starttls = $this->_smtp->starttls(); | ||
if(PEAR::isError($starttls)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A space after if
, and elseif
below. And after closing bracket.
Mail/smtp.php
Outdated
$starttls = $this->_smtp->starttls(); | ||
if(PEAR::isError($starttls)){ | ||
return PEAR::raiseError($starttls); | ||
} elseif($starttls === False){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
false
and spacing.
For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials. Change request from alecpl
It looks good now. I see one point of possible confusion. If you set auth=PLAIN and starttls=false, STARTTLS will still be used, as this is the default behavior for of the auth() method. However, I don't know how to solve that without a BC break. |
You´re right. Thank you. I´ve not seen this. I will do a new commit in a few hours, so we will be compatible. |
For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials. Another change request from alecpl
Now it should be compatible with the Net_SMTP workflow. |
Mail/smtp.php
Outdated
@@ -185,7 +204,8 @@ class Mail_smtp extends Mail { | |||
* passed in. It looks for the following parameters: | |||
* host The server to connect to. Defaults to localhost. | |||
* port The port to connect to. Defaults to 25. | |||
* auth SMTP authentication. Defaults to none. | |||
* auth SMTP authentication. Defaults to none. | |||
* starttls Should STARTTLS connection be used? Defaults to false. PEAR/Net_SMTP >= 1.10.0 required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default is not false
anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hawkeye ;-) I´m sorry. I have pushed another commit with "No default".
For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials. Another change request from alecpl
Hi, what are the next steps? |
Hi there. Do I need to do anything else to complete the merge? |
Is there anything that someone can do to help the maintainers to complete this merge? It appears to be approved, but I'm willing to put it into production if that would help. |
Merged. However, I'm not interested in this project anymore. |
So, if alecpl is not interested anymore, is there anyone who is interested? to do merges at this project in the future? |
@alecpl Thank you for all your work as a maintainer over the years! @gauthierm I see that you're the maintainer on Packagist. Are you able to merge changes? Given that this library almost never changes, if we can tag a new version for Packagist, I think the maintenance work will be done for a long time to come. |
I'll look at getting a release out in the next week or so. |
@ashnazg I would help, but I unlearned how to do the PEAR releases, and also don't want to burden my brain. But if you document it somewhere, I can help next time around. Or did we stop doing these? :D |
@schengawegga you can use the branch/commit in composer already: {
"name": "your/package",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/pear/Mail.git"
}
],
"require": {
"pear/mail": "dev-master#PUT-COMMIT-HERE"
}
} |
@ashnazg Thank you very very much. I am very happy about your effort. This will help us very much. @ashnazg @till How do you think about my proposal to helping you in developing this package? |
@till Thanks for the reply. This is also a very good solution. But i am also interested in learning to keep these packaging well maintained. Thats the reason why i am asking you all to be part of the development team. I think these PEAR packages are so valuable and helpful, so they have to be well maintained in the future. And to ensure that, i will help you all with the development work. |
@alecpl , should I mark you as inactive on the maintainer list? |
Yes, please. |
@schengawegga , I've added you as a Maintainer on the Mail project now. |
@ashnazg Thank you for adding me as a maintainer to this project. |
For using smartHost, wich authenticates the client via his ip address, to establish the STARTTLS connection without sending credentials.