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
STARTTLS support? #30
Comments
Sure, I'll add it by end of this week. Happy holidays @Lars- |
Hey @Lars- , checkout latest commit for the feature you requested, let me know if it works. |
Unfortunately, it doesn't work:
The code that I use: MaildroidX.Builder maildroidX = new MaildroidX.Builder()
.smtp("smtp.office365.com")
.smtpUsername("[REDACTED]")
.smtpPassword("[REDACTED]")
.isStartTLSEnabled(true)
.port(String.valueOf(587))
.type(MaildroidXType.PLAIN)
.to("[REDACTED]")
.from("[REDACTED]")
.subject("[REDACTED]")
.body(body)
.onCompleteCallback(new MaildroidX.onCompleteCallback() {
@Override
public void onSuccess() {
// Stuff
}
@Override
public void onFail(String s) {
//Stuff
}
@Override
public long getTimeout() {
return 5000;
}
}); When I try it with PHP, it does work. I looked it over a couple of times, but there doesn't seem to be any spelling mistake. $mail->SMTPDebug = SMTP::DEBUG_OFF;
$mail->isSMTP();
$mail->Host = 'smtp.office365.com';
$mail->SMTPAuth = true;
$mail->Username = '[REDACTED]';
$mail->Password = '[REDACTED]';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;
$mail->setFrom( '[REDACTED]' );
$mail->addAddress( '[REDACTED]' );
foreach ( $files as $file ) {
$mail->addAttachment( $file );
}
$mail->isHTML( false );
$mail->Subject = $_POST['subject'] ?? '';
$mail->Body = $_POST['body'] ?? '';
$mail->send(); What could the problem possibly be? |
Taking closer look at it, sorry for inconvenience |
I appreciate it, thanks! Maybe reopen the issue until it works? |
Did you check this? Maybe it's firewall issue? Let me know if that is the case. |
Yep, I checked it. The android app runs on the same network as the PHP script. So that couldn't be the problem. |
Alright, what version of Android is that? @Lars- |
Is issue being resolved? @Lars- |
Sorry, missed your comment. It's running on Android 5.1 and unfortunately not upgradeable. |
I'm pretty sure issue is with 5.1 version it self. So library wise I don't see what can be done. SSL seems to work on other versions. @Lars- |
Concluding this is not Maildroid issue. This issue has been addressed. |
Is your feature request related to a problem? Please describe.
I would like to send mails via Office365, but I can't seem to find any documentation on STARTTLS.
Describe the solution you'd like
STARTTLS support or the documentation for it.
Describe alternatives you've considered
Nothing yet, MailDroid is already implemented, so it would be great to keep using it.
Additional context
None
The text was updated successfully, but these errors were encountered: