How to send an e-mail from Windows Phone without using EmailComposeTask? - windows-phone-7

I need my application to send an e-mail to me directly without using the EmailComposeTask.
I also don't want to use a webservice for that.
Is there any open-source framework I could use?

There is currently not a way to send email w/o user input unless you want to send some information to a service and have the service send the email

Related

How to load test Sign Up API using Jmeter for 100 users where mobile number & email are unique

I have to perform load test on a Sign UP API using Jmeter.
Sign Up asks for:
valid cell # where system sends SMS code for verfication
Valid Email address where user receives a link for verification
Can any one help for this scenario.
Thanks in advance.
It might be tricky, however you can consider a 3rd-party application like Spikko or 2nr and use mobile automation framework like Appium from JSR223 Test Elements in order to get SMS text from the mobile application. If you don't have a real phone you can use an emulator like Bluestacks or Genymotion
For email it is way easier, JMeter comes with Mail Reader Sampler so you can fetch an email from any real box and extract confirmation URL from there, check out How to Create a JMeter Script to Check Email During Registration AND Grab the Confirmation URL for more details.
You probably should use JDBC Request and get from DB the code/link sent.
But if it's not possible, for email you can concatenate to same gmail +${UUID()}. Gmail at least support sending to same mail if have different suffix:
Here are two different ways you can modify your Gmail address and still get your mail:
Append a plus ("+") sign and any combination of words or numbers after your email address. For example, if your name was hikingfan#gmail.com, you could send mail to hikingfan+friends#gmail.com or hikingfan+mailinglists#gmail.com.

Get user email in windows 10 universal app

I am trying to build a control that the user can use to send feedback to developer. I am using email as a delivery method and I leverage sendgrid email service for this. Now I want to know the users email address so I can respond back to the user's concern. I am not sure how to get the user's email in window 10. Any help or pointers please?
I would strongly recommend to use the sharing approach that has been introduced with Windows 8 - instead of writing and maintaining your own mail functionality and trying to access additional user data.
Have a look at the existing and built in e-mail functionalities. They make use of the user's connected mail accounts and the mail app. This way you don't need to worry about handling the message transmission or anything but rather hand the information over to the mail client. This way you also know how to reply back.
And as a bonus, the user can still access their message via the Sent Mails folder :)
There is a specific class for that, the EmailMessageClass (https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.email.emailmessage.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1) as well as a dedicated guide with code example.
https://msdn.microsoft.com/en-us/library/windows/apps/mt269391.aspx
Essentially you can prepopulate the Mail fields with necessary app information where applicable. The user gets to choose which accounts he wants to send the mail from, but it will open in the mail client.

Is there a way to check for missed/unread notifications?

Is there an api in mango sdk that allows me to programatically poll the notifications/toast to at least get the count. I'd like to write background service check for missed messages.
It's not possible to get hold of the email/SMS messaging details like this in Windows Phone. The only way to interact with the email client is via the SDK Launchers and Choosers: see this link on MSDN.
About all you can do is call the EmailComposeTask or SmsComposeTask for writing a plain text email or SMS, or EmailAddressChooserTask for getting an email address from the address book.
Also bear in mind that launchers and choosers must be initiated by a user action and cannot be launched from any background agent code.

Simulating an attachment in the emailtask

In phone7 development, being able to send an email requires the use of the email task. This object doesn't not have an attachments property, and many ppl on various forums have complained about this particular lack of functionality. The problem is that Microsoft applications such as the picture gallery and OneNote have the ability to attach images and sound recordings to emails. This implies that there is a way to attach them.
Question: Is there a "hack" or other method that can be used to send emails with attachments in phone7?
No, there is no way to send attachments via the EmailComposeTask in a third party app. If you don't want to use an EmailComposeTask, you could create a server that runs a webservice which performs the sending of the email. Your app could then upload the attachment to that webservice.

How to send email with an attachment using Windows Phone 7 API?

My WP7 application requirement is to send the email with an attachment and use device default SMTP settings.
I have tried EmailComposeTask class but it doesn't have any member for attachment.
The other idea, i am thinking is to upload the file on server and then send the email from that server.
What you think if there is no way to send the email with an attachment using WP7 API?
Your observation is correct, at this point in time EmailComposeTask doesn't support attachments and this is the only facility to send email programatically from the device at the moment.
As you note, you can communicate with a server which can perform this task on behalf of your app.
I found a wp7 and wp8 library that does it: http://www.windowsphonegeek.com/marketplace/components/livemailmessage
Try to create web service to send mail in your webserver. so, we can call the from your app to send mail.
I hope upcoming version it will be possible!
Please check this URL for more details http://forums.silverlight.net/forums/p/209808/493532.aspx
I've found this article, but I did not make any test yet.
From the author:
EmailComposeTask won’t allow you to send attachments, but this doesn’t mean that you cannot send files through it. .NET Framework has these two amazing methods: Convert.ToBase64String and Convert.FromBase64String. The first will allow the developer to convert a byte array (byte[]) to a Base64-encoded string, the other one will do the same operation in reverse.
Reference:
Pushing the Limits of the Windows Phone SDK and Sending Files via EmailComposeTask

Resources