didonato
8 years agoCreator II
Error in Method (attach file in email)
(Error)
Server Error: The remote name could not be resolved: 'myservername.com'
We have a method that gets triggered from a workflow. This method sends a email with a attachment. I highlighted the section in the method that is causing the problem. This section worked fine in our LIVE database, the problem occurs in our development server that we just stood up.
// {
// string[] fileArr = new string[docFile.getItemCount()];
// for (int i=0;i<docFile.getItemCount();i++)
// {
// Item f = docFile.getItemByIndex(i).getRelatedItem();
// f.checkout(tempDir);
// string sAttach =tempDir + f.getProperty("filename");
// System.Net.Mail.Attachment myAttachment = new
// System.Net.Mail.Attachment(sAttach);
// MyMessage.Attachments.Add(myAttachment);
// fileArr=sAttach;
// }
// CCO.Email.setup_smtpmail_server_and_send(MyMessage);
// System.Threading.Thread.Sleep(2000);
// MyMessage.Attachments.Dispose();
// for (int j=0;j<docFile.getItemCount();j++)
// {
// FileInfo fileInfo = new FileInfo(fileArr);
// fileInfo.Delete();
// }
// }