简体   繁体   English

如何在Windows Phone 7中设置或确认电子邮件帐户以从我的发送邮件应用程序发送邮件

[英]How to set-up or confirm email account to sent email from my send mail application in Windows Phone 7

How to set-up or confirm email account to sent email from my send mail application in Windows Phone 7 如何在Windows Phone 7中设置或确认电子邮件帐户以从我的发送邮件应用程序发送邮件

I created simple email sending application in Windows Phone 7 but when i click on Send button i got this message:- " Make sure you've set-up an account and try again " 我在Windows Phone 7中创建了简单的电子邮件发送应用程序,但是当我单击“发送”按钮时,我收到以下消息:-“ Make sure you've set-up an account and try again

this is my application code: 这是我的应用程序代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;
namespace SendingMail
{
    public partial class MainPage : PhoneApplicationPage
    {
        EmailAddressChooserTask emailAddresstask;

        // Constructor
        public MainPage()
        {
            InitializeComponent();
            this.emailAddresstask = new EmailAddressChooserTask();
            this.emailAddresstask.Completed += new EventHandler<EmailResult>(emailAddresstask_Completed);
        }
        #region Events

        //Open Contact button click
        private void btnOpenContact_Click(object sender, RoutedEventArgs e)
        {
            emailAddresstask.Show();
        }

        //Email Address Chooser Task Completed
        private void emailAddresstask_Completed(object sender, EmailResult e)
        {
            if (e.TaskResult == TaskResult.OK)
            {
                txtTo.Text = e.Email;
            }
        }

        //Send mail button click
        private void btnMail_Click(object sender, RoutedEventArgs e)
        {
            EmailComposeTask Myemail_Composetask = new EmailComposeTask();
            Myemail_Composetask.To = txtTo.Text;
            Myemail_Composetask.Cc = txtCC.Text;
            Myemail_Composetask.Subject = txtSbj.Text;
            Myemail_Composetask.Body = txtbd.Text;
            Myemail_Composetask.Show();
        }
        #endregion
    }
}

You can't set up an email account in the Windows Phone 7 emulator. 您无法在Windows Phone 7模拟器中设置电子邮件帐户。 You'll need to test this on a Windows Phone 7 device, or else use the Windows Phone 8 SDK and the Windows Phone 8 emulator to test this scenario for your Windows Phone 7 app. 您需要在Windows Phone 7设备上对此进行测试,否则,请使用Windows Phone 8 SDK和Windows Phone 8模拟器为Windows Phone 7应用程序测试此方案。

From a device or the Windows Phone 8 emulator, go to Settings and select "email+accounts" and add the account. 在设备或Windows Phone 8模拟器上,转到“设置”,然后选择“电子邮件+帐户”并添加帐户。

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

相关问题 如何从Windows Phone 7应用程序发送电子邮件 - How to send email from windows phone 7 application 如何在我的电子邮件应用程序中添加登录屏幕并登录到我的电子邮件帐户(Windows Phone 7) - How to add login screen in my email application & login to my email account (windows phone 7) 如何从Windows Phone 8应用程序发送电子邮件? - How do I send an email from a Windows Phone 8 application? 如何使用yahoo邮件帐户从本地主机发送电子邮件? - How can I send email from my local host using yahoo mail account? 如何使用from字段在Windows Phone 8上使用C#发送电子邮件 - How to send email with C# on Windows Phone 8 with from field 如何在默认电子邮件应用程序(外观)上打开新邮件窗口以单击按钮发送电子邮件 - How to Open New Mail Windows on Default Email Application(outlook) to send email on button click 从Windows Phone 8.1发送电子邮件 - Send email from windows phone 8.1 使用自定义凭据从Windows Phone 8发送电子邮件 - Send Email from windows phone 8 with custom credentials 如何使用我的网站域中的邮件工具包发送 email - How to send email using Mail kit from my website domain 从Windows Phone 7应用程序发送电子邮件 - Sending email from Windows Phone 7 application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM