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

Cant send email IOS 13 #346

Closed
Eugene-Lytvynov opened this issue Apr 8, 2020 · 4 comments
Closed

Cant send email IOS 13 #346

Eugene-Lytvynov opened this issue Apr 8, 2020 · 4 comments

Comments

@Eugene-Lytvynov
Copy link

Eugene-Lytvynov commented Apr 8, 2020

Hi.
After email open, we see a composer window, but send button not active.

======================== code =========================
sendEmailExecuteAndroid(aTeacherEmail: string): Promise
{
return new Promise(
(resolved, rejected) => {
this.emailService.open(
{
to: [aTeacherEmail],
cc: [],
bcc: [],
subject: '',
body: '',
}
)
.then(() => resolved())
.catch(error => rejected(error));
}
)

}

=================== LOG =======================

o Native Cordova -> EmailComposer open EmailComposer1110454383 ["options": [{
app = "mailto:";
attachments = (
);
bcc = (
);
body = "";
cc = (
);
chooserHeader = "Open with";
from = "";
isHtml = 0;
subject = "";
to = (
"[email protected]"
);
}]]
2020-04-08 07:27:53.964886-0700 App[4644:1801229] [MFMailComposeViewController] is not a valid email address.
2020-04-08 07:27:54.311420-0700 App[4644:1801642] [Common] [FBSSystemService][0xbaa0] Error handling open request for com.apple.mobilemail: <NSError: 0x281834060; domain: FBSOpenApplicationServiceErrorDomain; code: 1 (RequestDenied); reason: "The request was denied by service delegate (SBMainWorkspace) for reason: Security ("Un-trusted clients may not open applications in the background")."> {
userInfo = {
FBSOpenApplicationRequestID = 0xbaa0;
}
underlyingError = <NSError: 0x281834150; domain: FBSOpenApplicationErrorDomain; code: 3 (Security); reason: "Un-trusted clients may not open applications in the background.">;
}
2020-04-08 07:27:54.311690-0700 App[4644:1801591] [General] #MailServices <MSAccounts: 0x2803b50c0> (0) : <connection: 0x28239c180> failed to send message <dictionary: 0x28329c5a0> NSError Domain=MailServices Code=2
APP INACTIVE
APP ACTIVE

@Eugene-Lytvynov
Copy link
Author

Looks like we found answer: it is heppends, if we use no app in parameters and not installed a default mailer in IOS.

@Eugene-Lytvynov
Copy link
Author

Any case: why we still have this in logs: is not a valid email address. it not possible select from in IONIC 4 capacitor 2. This field not exist in type

o Native Cordova -> EmailComposer open EmailComposer1567518029 ["options": [{
app = "mailto:";
attachments = (
);
bcc = (
);
body = "";
cc = (
);
chooserHeader = "Open with";
from = "";
isHtml = 0;
subject = "";
to = (
"[email protected]"
);
}]]
2020-04-08 08:00:29.148274-0700 App[4702:1814292] [MFMailComposeViewController] is not a valid email address.

@Eugene-Lytvynov
Copy link
Author

if we try to write:

this.emailService.open(
{
from: ['[email protected]'],
to: [aTeacherEmail],
cc: [],
bcc: [],
subject: '',
body: '',
}
)
.then(() => resolved())
.catch(error => rejected(error));

we have compilation error

error TS2345: Argument of type '{ from: string[]; to: string[]; cc: undefined[]; bcc: undefined[]; subject: string; body: string; }' is not assignable to parameter of type 'EmailComposerOptions'.
Object literal may only specify known properties, and 'from' does not exist in type 'EmailComposerOptions'.

[ERROR] An error occurred while running subprocess ng.

@jfoclpf
Copy link
Collaborator

jfoclpf commented Nov 26, 2021

maybe duplicate of #363

@jfoclpf jfoclpf closed this as completed Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants