In phonegap 1.4.1 in iOS6 unable to attach xml file from to mail client - email

to get help , I followed this post http://www.thoughtsonmobile.com/category/development/crossplattform-app-development
My objective is to use PhoneGap 1.4.1 plugin in iOS to write to an XML file and send that xml file via attachment in mail client
I am able to create an empty XML file in the path /var/mobile/Applications/D7558E05-1345-443E-A2E6-.../Document/readme.xml which I verified under Iexplorer to be under the Documents folder
I followed the steps in the mentioned site, exactly, but there is one confusion on how to pass the path to the Phonegap.exec command.. Should I pass the complete path "/var/mobile/Applications/D7558E05-1345-443E-A2E6-.../Document/readme.xml"
should I pass as follows
window.plugins.emailComposer.showEmailComposerWithCB(null, "subject", "body", "hello#gmail.com","ccsupport#test.com","bccsupport#test.com", false,XMLFilePath);
where
var XMLFilePath = window.rootFS.fullPath + "/" + "readme.xml";
or should it be just XMLFilePath = window.rootFS.fullPath
As mentioned in the site, in the EmailComposer.js I added
if(attachment)
args.attachment = attachment;
and checked, by alerting if the args.attachment is getting the path, its coming as /var/mobile/Applications/D7558E05-1345-443E-A2E6-.../Document/readme.xml
I added snippet as per the site, "NSString* attachmentPath = [options valueForKey...."to the EmailComposer.m code from "https://github.com/phonegap/phonegap-plugins/blob/master/iOS/EmailComposer/EmailComposer.m" which I am using
When I run the code I am NOT getting the attachment, am oly getting the subject, to and body
Please help
It would be very useful if you could upload a sample, complete xcode project for mail attachment.

Related

Cant able to find the link from email content of my mail-using robot -imap library

my email content below -
Hi example#gmail.com,
Please click on the link to confirm your registration, https://link here
here 2 links are there in email.-example#gmail.com,https:link here
i want to to automation of my activation email using robot -
here i tried to run the below code
Open Mailbox host=imap.gmail.com user=EXAMPLE#gmail.com password=PWD
${LATEST} = Wait For Email sender=SENDER#GMAIL.COM timeout=300
${parts} = Walk Multipart Email ${LATEST}
FOR ${i} IN RANGE ${parts}
Walk Multipart Email ${LATEST}
${content-type} = Get Multipart Content Type
Continue For Loop If '${content-type}' != 'text/html'
${payload} = Get Multipart Payload decode=True
Should Contain ${payload} EXAMPLE#gmail.com
after running the above code ,i got pass ,and in report ,i can see the email conetner shown above .
what i want is to fetch the activation link alone and click it .
which i failed many time .
please anyone help me to solve this.

LabDaq - sending attachment

I would like to attach a PDF file as the "result" for a LabDaq test and have it sent out through all the HL7 interfaces. The PDF file is not generated by LabDaq but rather added as an attachment. We see a way to select to have all attachments forwarded. However, we don't want to make a universal change for all attachments but rather a specific change for select attachments. For reference, the attachments are reference lab results.
You'll need to use the Mirth (Nextgen) Connect's Attachment Handler.
There's an overview on how to use it on the User Guide or on this blog post https://kailo.tech/health-it/mirth-connect-bits/mirth-connect-attachment-handler/
The blog post should explain how you can read a file and use the base64 string on an HL7 message.

Sending email attachments via UWP EmailManager not working

Sending an attachment from a universal app with the following code is not working, why?
Dim emailMessage As New EmailMessage()
emailMessage.[To].Add(New EmailRecipient("a#b.com"))
emailMessage.Subject = "Test"
emailMessage.Body = "Hello World"
Dim localAppFolder = Windows.Storage.ApplicationData.Current.LocalFolder
Dim file = Await localAppFolder.CreateFileAsync("SomeFile.txt", Windows.Storage.CreationCollisionOption.ReplaceExisting)
Await Windows.Storage.FileIO.WriteTextAsync(file, "aaaa")
Dim fileRef = RandomAccessStreamReference.CreateFromFile(file)
emailMessage.Attachments.Add(New EmailAttachment(file.Name, fileRef))
Await EmailManager.ShowComposeNewEmailAsync(emailMessage)
To, subject and body show fine in Outlook, but the attachment is missing: Outlook screenshot
I believe it is because the Outlook is a Desktop app. As I understood, the EmailManager.ShowComposeNewEmailAsync uses mailto: protocal to launch mail client app and use share to provide the email content.
If you choose the mail store app when the select default app dialog launches, you will be able to see the attachment as following:
If you have previously chosen Desktop Outlook app as the default as for mailto protocol, you have to change the default app for the mailto: protocol association in control panel .
Previously, the ShowComposeNewEmailAsync only works for windows phone runtime app. And it is not up-to-date in the document, because it doesn't include the win 10 support.
On Windows 10 mobile, it works well without any problem. But on Windows Desktop, you have to choose a store app.
This is still an issue in 2019, but I have found a workaround for my project.
I simply assemble an *.msg file with recipients, subject, body, attachments etc. and save it to the apps local cache folder. It can then be launched using Launcher.LaunchFileAsync
As *.msg files are associated with outlook, it will most likely be the default app to open this kind of file. You can create such a file using MsgKit
I have prepared a demo project at: https://github.com/Moolt/UniversialWindowsPlatform.LaunchOutlook

Downloading files from google drive with rest API / c++

I have files in my google drive , very small ones, <10kB, and I try to download those by using downloadUrl , but the result only seems to be redirection to happen all the time. I have seen also discussions about that but no actual results ..
I am using c++ and creating rest API request by myself ( not using any libraries for this )
But also , when I copy the url I receive after continue="..." web browser can make a download okay but calling that from C++ seems to cause just another redirection to happen .
I followed the instructions from:
https://developers.google.com/drive/web/manage-downloads
This is probably a duplicate of Unable to retrieve file content from google drive API which states that the access token for downloading content needs to be set as an HTTP header.

How to retrieve the .xml extension attachments from mail by using MailCore to Sample iPhone app

How to retrieve the .xml extension attachments from mail by using MailCore for iphone?
I used MailCore to download the attachments from my mail to my sample iPhone app. I getting Inbox subjects from my mail that subjects I sort to get particular mail subject and mail attachments.
The problem is I got particular mail subject but not attachments. I used below code to get attachments from mail but it's not working.
NSArray *Array=[msg attachments];
CTBareAttachment *ctbaratt=[Array objectAtIndex:0];
CTCoreAttachment *ctcoreatt=[ctbaratt fetchFullAttachment];
but I'm getting :
Array count is zero
Please share your ideas.
This could be for a few reasons:
1)It is possible that you're not downloading enough information about the CTCoreMessage. When making a request to download the CTCoreMessages you must specify what information you want by specifying the correct fetch attributes.
For example:
[core_folder messagesFromSequenceNumber:from to:to withFetchAttributes: CTFetchAttrEnvelope | CTFetchAttrBodyStructure]
should populate the information about the attachments.
When fetching a message from IMAP, the command will specify exactly what information it wants.
you can see what is being fetched by enabling MailCore Logging as follows:
MailcoreEnableLogging();
[core_folder messagesFromSequenceNumber:from to:to withFetchAttributes: CTFetchAttrEnvelope | CTFetchAttrBodyStructure];
MailcoreDisableLogging();
You will see commands of the format
<command number> <UID> <Command> (<requested structure>)
I imagine you will see something like this:
1 UID FETCH (ENVELOPE)
You should ensure that inside the () either BODY or BODY[2] or RFC822 as these will contain information about attachments.
When you see what is actually being fetched you can read the RFC, if you are dealing with mailcore and IMAP then it is well worth the investment in time.
2)Failing that, perhaps your CTCoreAccount and/or CTCoreFolder are not connected, thus preventing the CTCoreMessage from having a valid mailimapsession and being unable to download the attachment information. If an attribute inside a CTCoreMessage is not available then libetpan should download it on request. The fact that is it not suggests that your account or folder may be not valid or connected.