简体   繁体   English

使用自定义凭据从Windows Phone 8发送电子邮件

[英]Send Email from windows phone 8 with custom credentials

I need to send email programmatically from my windows phone 8 (c#). 我需要以编程方式从Windows Phone 8(c#)发送电子邮件。 I tried with "EmailComposeTask" and it considers the email configured in the device as sender.I want to give custom sender credentials which might not be same as that of configured credentials. 我尝试使用“ EmailComposeTask”,它将设备中配置的电子邮件视为发件人。我想提供自定义发件人凭据,该凭据可能与配置的凭据不同。

EmailComposeTask emailComposeTask = new EmailComposeTask();   
emailComposeTask.Subject = "message subject";//enter code here    
emailComposeTask.Body = "Append all your control strings here";    
emailComposeTask.To = "recipient@example.com";    
emailComposeTask.Cc = "cc@example.com";    
emailComposeTask.Bcc = "bcc@example.com";  
emailComposeTask.Show();

Here I need to specify the sender credentials also. 在这里,我还需要指定发件人凭据。

Any help would be appreciated. 任何帮助,将不胜感激。

You cannot set the sender credentials programmatically. 您无法通过编程方式设置发件人凭据。 there is no such property exposed by EmailComposeTask class. EmailComposeTask类没有公开这样的属性。 You can use other services like SendGrid etc. for this. 您可以SendGrid使用其他服务,例如SendGrid等。 For reference see Class specification on msdn 有关参考,请参见msdn上的类规范。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM