Lotus Notes 富文本内的 AX 2009 附件
可以使用 AX 2009 在 Lotus Notes 中创建电子邮件正文,并在电子邮件内所需的位置附加 PDF 或 xls 文件,为每个附加文件提供文本,并使该嵌入对象可单击并可以重命名它们?
尝试将此工作作为对您的文件的测试...
static void TestEmails(Args _args)
{
System.Net.Mail.MailMessage mailMessage;
System.Net.Mail.Attachment attachment;
System.Net.Mail.AttachmentCollection attachementCollection;
System.Net.Mail.SmtpClient smtpClient;
System.Net.Mail.MailAddress emailfrom;
System.Net.Mail.MailAddress emailto;
str messageBody;
str Subject;
str SMTPServer;
str Filenm;
FileIOPermission permission1;
str fileToSend;
;
fileToSend = "P:\\Tests\\TestFile.pdf";
emailfrom = new System.Net.Mail.MailAddress("[email protected]","");
emailTo = new System.Net.Mail.MailAddress("[email protected]","");
messageBody = "Test Body";
Subject = "Test Subject";
SMTPServer = SysEmailParameters::find(false).SMTPRelayServerName;
mailMessage = new System.Net.Mail.MailMessage(emailfrom, emailTo);
mailmessage.set_Subject(Subject);
mailmessage.set_Body(messageBody);
attachementCollection = mailMessage.get_Attachments();
Filenm = fileToSend;
permission1= new FileIOPermission(Filenm,'w');
permission1.assert();
attachment = new System.Net.Mail.Attachment(Filenm);
attachementCollection.Add(attachment);
smtpClient = new System.Net.Mail.SmtpClient(SMTPServer);
smtpClient.Send(mailmessage);
CodeAccessPermission::revertAssert();
}
标准 AX 无法为您做到这一点。
您也许可以编写代码,但它看起来很棘手。