如何显示消息的正文文本并通过在此代码中进行修改将其保存为文本文件 [英] How to display the body text of message and save it as a text file by modify in this code

查看:86
本文介绍了如何显示消息的正文文本并通过在此代码中进行修改将其保存为文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个人我都需要帮助,以通过修改此代码来显示电子邮件的正文而不是电子邮件地址.

Hii everyone i need help to display the body text of email instead of the email address by modify in this code .

RequestSettings logininfo = new RequestSettings("",textBox1 .Text ,textBox2 .Text);
logininfo.AutoPaging = true;
ContactsRequest crequest=new ContactsRequest(logininfo) ;
Feed<contact> feedcontacts = crequest.GetContacts();
foreach (Contact gmailAddresses in feedcontacts.Entries)
{
    Console.WriteLine("\t" + gmailAddresses.Title);
    listBox1.Items.Add(gmailAddresses.Title);
    foreach (EMail emailId in gmailAddresses.Emails)
    {
        Console.WriteLine("\t" + emailId.Address);
        listBox1.Items.Add(" " + emailId.Address);
    }
}



[edit]添加了代码块,对HTML标签进行了编码-OriginalGriff [/edit]



[edit]Code block added, HTML tags encoded - OriginalGriff[/edit]

推荐答案

这将取决于您的EMail类的定义-不是标准的.NET类,所以我不能说.我会尝试查看文档,智能感知,或者只是尝试将emailId.Address替换为emailId.Body或emailId.Text
That is going to depend on the definition of your EMail class - it''s not a standard .NET class, so I can''t say. I would try either looking at the documentation, intellisense, or just trying replacing emailId.Address with emailId.Body or emailId.Text


这篇关于如何显示消息的正文文本并通过在此代码中进行修改将其保存为文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆