附加带有ID的电子邮件主题 [英] Append email subject with ID
问题描述
我已经编写了用于发送电子邮件的C#代码.现在我需要从列表和修改中获取电子邮件主题,我需要在主题中添加ID,并将ID从列表项追加到主题中,并且我使用了以下内容一段代码但不起作用
I have written c# code for sending emails.now I have email subject getting from list and modification I need to do in the subject that I need to append the ID from list item to my subject and I used the below piece of code but not working
SpItem Item = getmailmessage(消息ID,_ID,当前网络);
SpItem Item=getmailmessage(message ID, _ID,ocurrentweb);
system.Text.stringbuilder sb = 新的system.text.stringbuilder();
system.Text.stringbuilder sb= new system.text.stringbuilder();
_msg.subject = sb.append(convert.Tostring(item [邮件主题"]])).append(_ID); //不起作用
_msg.subject= sb.append(convert.Tostring(item["Mail Subject"])).append(_ID); //not working
闪电战
推荐答案
我认为StringBuilder.Append应该不是问题.
我建议您检查/调试_ID 正确获取价值.
这篇关于附加带有ID的电子邮件主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!