In my application, I want the user can send a feedback for me by gmail. Can I set an gmail account in my app, then it will send me the feedback to my email ?
You should use the EmailComposeTask API:
EmailComposeTask emailComposeTask = new EmailComposeTask();
emailComposeTask.Subject = "Feedback";
emailComposeTask.To = "youremail#gmail.com";
emailComposeTask.Show();
Related
Microsoft seems to want to start disabling Basic Auth for Exchange Online and mentioned ending support for EWS protocol
https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-and-exchange-online-february-2021-update/ba-p/2111904
We're using Microsoft.Exchange.WebServices.2.2 library to get emails from EWS inbox like that:
var service = new ExchangeService(ExchangeVersion.Exchange2010);
service.Credentials = new NetworkCredential(username, password, domain);
var findResults = service.FindItems(WellKnownFolderName.Inbox, new ItemView(int.MaxValue));
Is this going to be disabled in the near future? Should we change the way we access emails?
In a desktop application I want to get the current user's email address to use Exchange Web Services auto discovery mechanism as here:
var svc = new ExchangeService()
{
UseDefaultCredentials = true
};
svc.AutodiscoverUrl("user#company.com");
I know the current users domain\username; how do I get the email address before configuring EWS?
You need to use something other then EWS to get that eg LDAP is generally the most common method eg see something like Get UPN or email for logged in user in a .NET web application
Cheers
Glen
I am developing a simple windows phone 8 app using visual studio express 2012 and WP8 SDK using C# and SQLite. I would like to know how to send SMS or email to various recipients using this app with my windows phone (I do not want to send SMS through internet )
thanks a lotttt :)
You can't send an SMS or an email (from system account) without user approval. To do that use Launchers:
Email: Use EmailComposeTask: How to use the email compose task for Windows Phone
SMS: Use SmsComposeTask: How to use the SMS compose task for Windows Phone
They both shows popup and ask user to approve the message to be send.
in windows phone 8.1 i use the following code in C#:
ChatMessage chatMessage = new ChatMessage();
chatMessage.Body = "Text message";
chatMessage.Recipients.Add("phonenumber");
await ChatMessageManager.ShowComposeSmsMessageAsync(chatMessage);
Hope it helps :)
I want to send an sms or email automatically in a emergency situation without any user interaction.
The following code helps me in composing the sms or email but need user to tap the send button
private static void SendSms(string mobileNumber)
{
SmsComposeTask smsComposeTask = new SmsComposeTask();
smsComposeTask.To = mobileNumber;
smsComposeTask.Body = "Alert: Save me! My last location was -";
smsComposeTask.Show();
}
private static void SendEmail(string emailAddress)
{
EmailComposeTask emailComposeTask = new EmailComposeTask();
emailComposeTask.To = emailAddress;
emailComposeTask.Subject = "Alert: Save me!";
emailComposeTask.Body = "Please save me my last location was - ";
emailComposeTask.Show();
}
Isn't there any way by which i can by pass the user tap action to send the sms?
Although it's not as easy as using the built-in features, it can be done if you're willing to use web services. For example, twilio will let you send SMS messages for around $0.01/message (there are other SMS services out there so better pricing may be available).
If you're adventurous enough, you could even write your own SMS service that could send messages without the help of 3rd parties (again, not recommended because the ROI likely wouldn't be there unless you were sending a ton of messages).
Sending e-mail via a web service would likely be a simpler solution as it's not hard to write some .NET code that will send e-mail messages for you (when you have the full .NET Framework at your disposal).
Once you have a web service that can send messages for you, it's a simple matter for your phone app to call the service without any user interaction.
It is not possible in Windows Phone. You can prepare an SMS orEmail, but user must be sending it out.
I wonna send email through gmail smtp, but users should see my corporative "From"
SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
smtp.EnableSsl = true;
smtp.Credentials = new NetworkCredential("igor#dynback.com", "pass", "mail.dynback.com");
I am getting SmtpException:
"The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required"
I heard its all possible and called "Relay", but I am not sure, do i need to put somehow google credentials?
You'll have to use a Google account for the credentials. You should be able to set the From or ReplyTo address in your MailMessage to whatever you want.
Use "Save As" feature in gmail.