iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello Crosslight Support,
I was just trying to send a mail with an attachment and it failed. I send the mail via GMail and after composing the mail and switching to GMail everything seams to be there, even the attachment. But when I send the mail it says "attachment could not be send". I receive the mail with Outlook, but without the attachment.
Here is my code:
public void SendMail(){ string data = this.GetDataAsString(); byte[] bytes = System.Text.Encoding.UTF8.GetBytes(data);
ObservableCollection<MailAttachment> mailAttachments = new ObservableCollection<MailAttachment>(); mailAttachments.Add(new MailAttachment("export.csv", "text/csv", bytes));
MailMessage mailMessage = new MailMessage(" "mail@mail.com", "Subject", "Body", true, mailAttachments);
this.MobileService.Mail.ComposeMail(mailMessage, result2 => { });}
I have to following permissions set:
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.ACCESS_NETWORK_STATE
android.permission.INTERNET
Any ideas?
Thanks,
Thomas
Additional info:
Testing this with the services sample on iOS worked. I have the picture attached to the mail.
Testing this with the services sample on Android did not work. No attachment is received.
It seems like a problem on the Android platform. Please, have a look.
Thank you for your valuable feedback regarding the problematic behavior on compose mail with attachment sample.
I have submitted the problems to Crosslight development team to be investigated further. It is filed under backlog: CROS-428.
I will keep this thread updated with any news I heard from the team regarding CROS-428.
Hello Yudi,
the latest update fixed the problem with the attachment. Now it is possible to send a mail with attachment. Unfortunately, I discovered a new problem. The "ComposeMail" call can have a callback parameter. When defining a callback function, this function is never called after sending a mail.
Tested on Android device, custom solution and latest services sample (no toast after sending mail with attachment).
Sorry for any inconvenience this problem may have caused you.
This problem is filed under CROS-466 and has been forwarded to Crosslight development team to be investigated further. Should I hear any news regarding CROS-466, I will let you know.
I'd like to inform you that a nightly build hotfix is available which resolves the problem submitted under CROS-466. The nightly build is available in here.
Please have the nightly build hotfix evaluated on your and let me know whether it helps or not.
I have once more a strange problem with the mail service. Today, I updated to Crosslight 2 Update 4 and I also updated the samples. Starting the service sample and sending a mail with attachment works fine and I even hit the callback method. So, the bug is fixed.
But, I have an existing project were I originally encountered the bug. I updated this project to "Update 4" and tested on an Android device. There is a SendMail() method within the SimpleViewModel. When calling the mail service I get an error (see error_msg.png). I attached the project as zip file. After starting the android project open the drawer and go to "Export entries". Then hit the button "Export entries". You will enter the SendMail() method and you hopefully get the same error.
I don't know my this doesn't work. When I reference a previous version of Crosslight (2.0.5000.68), I don't get this error.
What am I doing wrong?
Thank you for the feedback.
The problem which is reported on August 31, 2014 has been submitted to Crosslight development team under CROS-539.
Today, the dev team has managed to resolve this problem. A nightly build hotfix is available in here.
I have tested the nightly build on the TEA.AccountBook project attached on August 31, 2014; and found that the reported problem is no longer persist; the message and the attachment (export.csv) was successfully sent without any issues.
Please have the nightly build evaluated on your end and let us hear whether it helps or not.
could you please test this whole mail thing again before publishing the next version. When starting to send the mail I get a selection dialog on my device where I can choose between different mail apps. Hitting the hardware back button on this dialog brings me back to my app and into the callback method of the "ComposeMail" command.
I have no error in the "Error" property of the callback argument and the "Status" property says "Intersoft.Crosslight.MailComposeStatus.Sent". I did not send the mail because I hit the hardware back button. There should be another state, so I can react on this correctly in my code. Right now trying to send a mail always tells me "the mail was sent" even if the mail app wasn't started.
Please, rework this and test it carefully on each platform.
E-mail callback mechanism in iOS is different from that found on Android and WinPhone.On Android and WinPhone platform there is no way to retrieve the email callback. The callback will always return sent state.
Hope this helps.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname