Skip to content
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

Fixed issue whereby you could not select Google's alternative SSL port. #199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions app/code/local/Aschroder/SMTPPro/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public function isGoogleAppsEnabled($storeId = null)
{
return Mage::getStoreConfig('smtppro/general/option', $storeId) == "google";
}
public function isGoogleAppsSSLEnabled($storeId = null)
{
return Mage::getStoreConfig('smtppro/general/option', $storeId) == "googlessl";
}

public function isAmazonSESEnabled($storeId = null)
{
Expand Down Expand Up @@ -111,6 +115,15 @@ public function getGoogleAppsPassword($storeId = null)
return Mage::getStoreConfig('smtppro/general/googleapps_gpassword', $storeId);
}

public function getGoogleAppsSSLEmail($storeId = null)
{
return Mage::getStoreConfig('smtppro/general/googleappsssl_email', $storeId);
}

public function getGoogleAppsSSLPassword($storeId = null)
{
return Mage::getStoreConfig('smtppro/general/googleappsssl_gpassword', $storeId);
}

public function getSendGridEmail($storeId = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ public function toOptionArray()
{
$options = array(
"disabled" => Mage::helper('smtppro')->__('Disabled'),
"google" => Mage::helper('smtppro')->__('Google Apps or Gmail'),
"google" => Mage::helper('smtppro')->__('Google Apps or Gmail (TLS)'),
"googlessl" => Mage::helper('smtppro')->__('Google Apps or Gmail (SSL)'),
"smtp" => Mage::helper('smtppro')->__('Custom SMTP'),
"sendgrid" => Mage::helper('smtppro')->__('SendGrid'),
"mailup" => Mage::helper('smtppro')->__('MailUp'),
"ses" => Mage::helper('smtppro')->__('Amazon SES')
);
return $options;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class Aschroder_SMTPPro_Model_Transports_Google extends Aschroder_SMTPPro_Model_Transports_Basesmtp {

public function getName($storeId) {
return "Google Apps/Gmail";
return "Google Apps/Gmail (TLS)";
}
public function getEmail($storeId) {
return Mage::helper('smtppro')->getGoogleAppsEmail($storeId);
Expand Down
31 changes: 31 additions & 0 deletions app/code/local/Aschroder/SMTPPro/Model/Transports/GoogleSSL.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* @author Ashley Schroder (aschroder.com)
* @copyright Copyright (c) 2014 Ashley Schroder
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

class Aschroder_SMTPPro_Model_Transports_GoogleSSL extends Aschroder_SMTPPro_Model_Transports_Basesmtp {

public function getName($storeId) {
return "Google Apps/Gmail (SSL)";
}
public function getEmail($storeId) {
return Mage::helper('smtppro')->getGoogleAppsSSLEmail($storeId);
}
public function getPassword($storeId) {
return Mage::helper('smtppro')->getGoogleAppsSSLPassword($storeId);
}
public function getHost($storeId) {
return "smtp.gmail.com";
}
public function getPort($storeId) {
return 465;
}
public function getAuth($storeId) {
return 'login';
}
public function getSsl($storeId) {
return 'ssl';
}
}
2 changes: 2 additions & 0 deletions app/code/local/Aschroder/SMTPPro/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@
<option>disabled</option>
<googleapps_email></googleapps_email>
<googleapps_gpassword backend_model="adminhtml/system_config_backend_encrypted" />
<googleappsssl_email></googleappsssl_email>
<googleappsssl_gpassword backend_model="adminhtml/system_config_backend_encrypted" />
<sendgrid_email></sendgrid_email>
<sendgrid_password backend_model="adminhtml/system_config_backend_encrypted" />
<mailup_email></mailup_email>
Expand Down
23 changes: 22 additions & 1 deletion app/code/local/Aschroder/SMTPPro/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,27 @@
<depends><option>google</option></depends>
</googleapps_gpassword>

<googleappsssl_email translate="label">
<label>Google Apps Email Address</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><option>google</option></depends>
</googleappsssl_email>
<googleappsssl_gpassword translate="label comment">
<label>Google Apps Password</label>
<comment><![CDATA[Input your Google Apps or Gmail username and password here. For configuration recommendations please see the guide at <a href='http://magesmtppro.com' target='_blank'>magesmtppro.com</a>]]></comment>
<frontend_type>password</frontend_type>
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
<sort_order>23</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<depends><option>google</option></depends>
</googleappsssl_gpassword>

<sendgrid_email translate="label">
<label>SendGrid Username</label>
<frontend_type>text</frontend_type>
Expand Down Expand Up @@ -311,4 +332,4 @@
</groups>
</smtppro>
</sections>
</config>
</config>