Comments (9)
Can you show the actual code?
from nativescript-email.
Sure. Here's the piece of it that contains the email portion: (See below the code for the value of the attachment path variable)
email.available().then((avail: boolean) => {
if(avail) {
dialogs.prompt({
title: "Enter Email",
message: "Please enter the address you want to send the document to below",
okButtonText: "Send",
cancelButtonText: "Cancel",
inputType: dialogs.inputType.email
}).then((r) => {
if(r.result = true) {
if(r.text != "") {
email.compose({
subject: "CPU Signed Form - " + this.cpuOrder.OrderNumber,
body: "See attachment.",
to: [r.text],
attachments: [
{
fileName: this.cpuOrder.OrderNumber + '-SIG.pdf',
path: this.pdfPath,
mimeType: 'application/pdf'
}]
}).then(
function() {
console.log("Email composer closed");
}, function(err) {
dialogs.alert({
title: "Email Not Sent"
,message: "Error: " + err
,okButtonText: "Ok"
});
});
}
else {
dialogs.alert({
title: "Enter a Valid Email"
,message: "Please enter an email address"
,okButtonText: "Ok"
});
}
}
})
}
else {
dialogs.alert({
title: "Email Not Supported"
,message: "This device does not support OR is not set up for emailing."
,okButtonText: "Ok"
});
}
The error reads: "File not found for path: http://cpuimages.ivansmith.com/CPUImages/SignaturePDFs/1001903LG28-SIG.pdf"
So that is going to be the value of the variable in the code.
from nativescript-email.
Quite frankly, I can't access that file either:
from nativescript-email.
Well you aren't going to be able to if you aren't on the correct network. I can though from a browser.
from nativescript-email.
I am also displaying the PDF via another NativeScript plugin using the same variable, so the same URL. So it is not as though the app itself cannot access it.
from nativescript-email.
Let’s not complicate things. Do you have the same issue with a publicly available pdf (please post an example)
from nativescript-email.
Good thought. I tried replacing the variable in my code with the public URL you find here. It gives the same error.
email.available().then((avail: boolean) => {
if(avail) {
dialogs.prompt({
title: "Enter Email",
message: "Please enter the address you want to send the document to below",
okButtonText: "Send",
cancelButtonText: "Cancel",
inputType: dialogs.inputType.email
}).then((r) => {
if(r.result = true) {
if(r.text != "") {
email.compose({
subject: "CPU Signed Form - " + this.cpuOrder.OrderNumber,
body: "See attachment.",
to: [r.text],
attachments: [
{
fileName: this.cpuOrder.OrderNumber + '-SIG.pdf',
path: "https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf",
mimeType: 'application/pdf'
}]
}).then(
function() {
console.log("Email composer closed");
}, function(err) {
dialogs.alert({
title: "Email Not Sent"
,message: "Error: " + err
,okButtonText: "Ok"
});
});
}
else {
dialogs.alert({
title: "Enter a Valid Email"
,message: "Please enter an email address"
,okButtonText: "Ok"
});
}
}
})
}
else {
dialogs.alert({
title: "Email Not Supported"
,message: "This device does not support OR is not set up for emailing."
,okButtonText: "Ok"
});
}
})
from nativescript-email.
Is there any update on this by chance? I have now tested this on an Android, as well as, iOS and the issue occurs on both.
from nativescript-email.
I have not found time to look into it. Flagging it as "help wanted" so perhaps someone else can step in.
from nativescript-email.
Related Issues (20)
- Image CID?
- Hint not showing on iOS? HOT 4
- More restrictive emailapp filtering HOT 1
- Set new activity flag for Android
- AndroidRuntimeException HOT 1
- android.intent.action.SENDTO HOT 5
- Attachments not working. HOT 5
- Cannot read property 'toString' of null when running on android 5 HOT 2
- Not working when Webpacked on Android
- Support for "markingMode" flag
- IOS: Email compose not opening when called from modal HOT 5
- HTML support in composed email HOT 1
- Module not found: Error: Can't resolve 'nativescript-email' HOT 1
- Cannot use compose when presented from a modal view on iOS HOT 1
- ios device available() returns false
- Don't cache the availability check
- open email client HOT 1
- email.available not working properly on iPad Pro (4th generation)
- Error when being used with NativeScript version 8 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-email.