2012-02-08 71 views
0

这可能是非常简单的你的大师,但我难住这一点。我有一种方法可以收集电子邮件的所有信息,然后通过Outlook发送出去。但是,我想要考虑多个附件。我会怎么做?我需要在我的方法头中更改什么?发送电子邮件从LINQ清单中的多个附件

public static void sendOutlookMail(string toAddress, string emailSubject, string ccAddress = null, string emailAttachment = null, string emailBody = null) 

我知道,我必须要改变,但不知道是什么,并保持默认值:

string emailAttachment = null 

在此先感谢。

如果您需要更多详细信息,请让我知道。与此

 string emailAttachment = null 

回答

1

如果你想传递的字符串列表,你可以替换此

List<string> emailAttachment = null 
1

理想情况下,你应该改变,要

List<System.Web.Mail.MailAttachment> 

希望帮助

相关问题