English 中文(简体)
在通过社发首脑会议发送电子邮件时使用习俗标识
原标题:Using custom display name when sending email through EWS

使用<代码>EWS (Exchange Web Services)和Exchange 2010在本组织内部生成和发送电子邮件。 我们现在有一个单一的邮箱/用户,我们的所有申请都通过“<编码>>> 应用程序发送。

发出测试信息时,在收受邮箱收到电子邮件时,无论在什么<<>上显示<><>号>,其名称在<>/>交换<>上,无论在“<><><><>上”。

样本代码:

EmailMessage message = new EmailMessage(ExchangeManager.CreateConnection());

// set from address as generic application account
message.From = new EmailAddress("[email protected]");

// set custom display name for sender email
message.From.Name = "Test Display Name";

// set send recipient as myself for testing
message.ToRecipients.Add(new EmailAddress("[email protected]"));

ExchangeManager.SendExchangeMessage(message);

但收到这一信息时,它显示的是app 账户的缺省名称,而不是上文代码中使用的“试验显示名称”。 见以下方框中的展望简介:

https://i.stack.imgur.com/QxAvb.gif” alt=“In Box View”/>

这种做法在利用2003年交易所STMP服务时是有效的,我们可以根据需要将地址格式化,如“内联网基因邮件”或“Some Other Application”等。 现在,“2010年交流会”和“经济、社会、文化权利国际公约”似乎使我们无法选择使用一种习俗。

I have also verified through debugging that the display name is being set successfully before the message is sent.

是否有任何人成功地利用了“EWS”/“2010年交换”的习俗。

问题回答

(按C#术语计算) 通常的方法

电子邮件:address()

a. 具有超载体,在您中可以具体说明显示名称:

message.From = new EmailAddress("Custom Display Name", "[email protected]");

Try the abovecode & see.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签