@@ -17,16 +17,10 @@ import lombok.extern.slf4j.Slf4j; | |||||
import org.cobbzilla.mail.sender.SmtpMailSender; | import org.cobbzilla.mail.sender.SmtpMailSender; | ||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
import static org.cobbzilla.util.daemon.ZillaRuntime.die; | import static org.cobbzilla.util.daemon.ZillaRuntime.die; | ||||
@Slf4j | @Slf4j | ||||
public class SmtpEmailDriver extends CloudServiceDriverBase<EmailDriverConfig> implements EmailServiceDriver { | public class SmtpEmailDriver extends CloudServiceDriverBase<EmailDriverConfig> implements EmailServiceDriver { | ||||
protected static final String SENDGRID_SMTP = "smtp.sendgrid.net"; | |||||
private static final List<String> SEPARATE_DRIVERS_SMTPS = new ArrayList<>(); | |||||
protected static final String PARAM_USER = "user"; | protected static final String PARAM_USER = "user"; | ||||
protected static final String PARAM_PASSWORD = "password"; | protected static final String PARAM_PASSWORD = "password"; | ||||
@@ -54,10 +48,7 @@ public class SmtpEmailDriver extends CloudServiceDriverBase<EmailDriverConfig> i | |||||
} | } | ||||
} | } | ||||
protected boolean isServiceCompatible(final String serviceHost) { | |||||
// Allow even Sendgrid here if Subusers are not supported for specified API key | |||||
return !SEPARATE_DRIVERS_SMTPS.contains(serviceHost); | |||||
} | |||||
protected boolean isServiceCompatible(final String serviceHost) { return true; } | |||||
@Override public boolean send(Account account, AccountMessage message, AccountContact contact) { | @Override public boolean send(Account account, AccountMessage message, AccountContact contact) { | ||||
return EmailServiceDriver.send(this, account, message, contact); | return EmailServiceDriver.send(this, account, message, contact); | ||||
@@ -1,5 +1,10 @@ | |||||
package bubble.cloud.email; | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.cloud.email.sendgrid; | |||||
import bubble.cloud.email.SmtpEmailDriver; | |||||
import bubble.dao.account.AccountDAO; | import bubble.dao.account.AccountDAO; | ||||
import bubble.dao.cloud.CloudServiceDAO; | import bubble.dao.cloud.CloudServiceDAO; | ||||
import bubble.model.account.Account; | import bubble.model.account.Account; | ||||
@@ -31,6 +36,8 @@ import static org.cobbzilla.wizard.model.IdentifiableBase.DEFAULT_SHORT_ID_LENGT | |||||
* Only to be used with Sendgrid account with Subusers supported! | * Only to be used with Sendgrid account with Subusers supported! | ||||
*/ | */ | ||||
public class SendgridSmtpEmailDriver extends SmtpEmailDriver { | public class SendgridSmtpEmailDriver extends SmtpEmailDriver { | ||||
public static final String SENDGRID_SMTP = "smtp.sendgrid.net"; | |||||
public static final String SG_API_BASE = "https://api.sendgrid.com/v3/"; | public static final String SG_API_BASE = "https://api.sendgrid.com/v3/"; | ||||
private static final String PARAM_PARENT_SERVICE = "parentService"; | private static final String PARAM_PARENT_SERVICE = "parentService"; |
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.dao.device; | package bubble.dao.device; | ||||
public interface HasDeviceDAO { | public interface HasDeviceDAO { | ||||
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.model.device; | package bubble.model.device; | ||||
import lombok.Getter; | import lombok.Getter; | ||||
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.resources.device; | package bubble.resources.device; | ||||
import bubble.model.account.Account; | import bubble.model.account.Account; | ||||
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.service.stream; | package bubble.service.stream; | ||||
import org.cobbzilla.util.system.Bytes; | import org.cobbzilla.util.system.Bytes; | ||||
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.service.stream.charset; | package bubble.service.stream.charset; | ||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.service.stream.charset; | package bubble.service.stream.charset; | ||||
import java.io.InputStream; | import java.io.InputStream; | ||||
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.service.stream.charset; | package bubble.service.stream.charset; | ||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.service.stream.charset; | package bubble.service.stream.charset; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.test.filter; | package bubble.test.filter; | ||||
import bubble.model.app.AppMatcher; | import bubble.model.app.AppMatcher; | ||||
@@ -1,3 +1,7 @@ | |||||
/** | |||||
* Copyright (c) 2020 Bubble, Inc. All rights reserved. | |||||
* For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ | |||||
*/ | |||||
package bubble.test.filter; | package bubble.test.filter; | ||||
import bubble.resources.stream.FilterHttpRequest; | import bubble.resources.stream.FilterHttpRequest; | ||||
@@ -1 +1 @@ | |||||
Subproject commit c0fc1fee1e80226829fd8f55ad1f4e13d8908107 | |||||
Subproject commit 970398336cd27b2cc76f8246814a2cafc2ab9105 |
@@ -1 +1 @@ | |||||
Subproject commit a9d3d69f1112a47b8d69f9343cc66caf5bab1383 | |||||
Subproject commit da9910657301c1df8e1e1158925c2324d4cbe222 |