通过C#隐藏SentBy字段发送Lotus Notes电子邮件 [英] Sending Lotus Notes email through C# hiding SentBy field

查看:174
本文介绍了通过C#隐藏SentBy字段发送Lotus Notes电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用C#开发了代码,该代码在Lotus Notes中发送电子邮件. 我想隐藏电子邮件中的SentBy(发件人).我有用户用于创建自定义字段的Principal字段.

I have developed code,in C#, which sends email in Lotus Notes. I want SentBy(From field) in the email to be hidden. I have user the Principal field to make Custom field.

NotesDocument doc = db.CreateDocument();              
 doc.ReplaceItemValue("Form", "Memo");               
 doc.ReplaceItemValue("SendTo", richTextBox1.Text.Trim().Split(','));  
 doc.ReplaceItemValue("Subject", richTextBox3.Text);  
 doc.ReplaceItemValue("Principal", "Test Demo");  
 NotesRichTextItem _richTextItem = doc.CreateRichTextItem("Body");
 _richTextItem.AppendText(richTextBox4.Text + "\r\n");  
 doc.SaveMessageOnSend = true;  
 if (this.check)             
    doc.Send(false);  
 MessageBox.Show("Mail Sent successfully");  

以上代码可以完美地发送电子邮件,但不会隐藏SentBy(发件人"字段).发送者(发件人"字段)始终显示运行此代码的人员的姓名以及委托人".是否可以将其隐藏起来,以便仅主体"字段(此处为测试演示")是可见的.

The above code sends email perfectly but it doesn't hide the SentBy (From field). Sent By ( From field) always shows the name of the person running this code along with the Principal. Can this be hidden so that only the Principal field, here Test Demo, is only visible.

推荐答案

如果使用NotesDocument.Send()方法,则不能将其隐藏. (IBM Domino是一个企业电子邮件系统,因此,欺骗发件人并不容易.)

It can't be hidden if you're using the NotesDocument.Send() method. (IBM Domino is an enterprise email system, so it doesn't make spoofing senders easy.)

如果直接将消息写到Domino服务器的mail.box文件中,则可以将其隐藏.但是,IBM不支持该功能,因此,如果您执行任何操作会加重电子邮件路由和发送的麻烦,那您就一个人靠自己了.不过,在

It can be hidden if you write the message directly to the Domino server's mail.box file. That's not supported by IBM, though, so if you do that you're on your own if you do anything that screws up email routing and delivery. You can find a link to sample code that does it, though, in one of the answers to this older question.

这篇关于通过C#隐藏SentBy字段发送Lotus Notes电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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