简体   繁体   中英

Send Email from windows phone 8 with custom credentials

I need to send email programmatically from my 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 = 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. You can use other services like SendGrid etc. for this. For reference see Class specification on msdn

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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