How long does Epicor hold onto file after sending as attachment?

When sending an email with attachment in a BPM through the configured SMTP server, Epicor is holding onto and locking the file long after the email is sent (sitting at 10 minutes currently).

Is there a workaround or a way to force epicor not to hold onto the file after the email is sent?

1 Like

Answer to the topic header question is 20 minutes. Still wondering about a workaround.

2 Likes

Did you win the EUG RUG cup like 6 years ago?

1 Like

You did, good to see you here still man I always wondered how you were doing. I haven’t seen you at the insights or at least I didn’t know your company name at first. I found your contact in my phone just now though.

What attachment is it grabbing? Something locally?

Files exist in a network share.

I’ve been doing great. How bout you?

1 Like

Did you do this in a custom code widget? You may have to post the code for the others to figure out what may be happening, but maybe not. this is out of my realm, good to see you, glad you are here.

I’m good, you going to insights this coming year?

Here is the important parts of the code:

  string _FileName = $@"\\server\pathtofile\{_PSID}.pdf";
  StringBuilder _Body = new System.Text.StringBuilder();
  _Body.AppendLine($"Pink Sheet {_PSID}");

Omitted some additional AppendLines

  //  Send Email
  var _Mailer = this.GetMailer(async: false);
  var _Message = new Ice.Mail.SmtpMail();
  _Message.To.Add("tyler.carlin@halconfurniture.com");
  _Message.SetFrom("epicor@halconfurniture.com");
  _Message.SetSubject($"Pink Sheet {_PSID}");
  _Message.SetBody(_Body.ToString());
  Dictionary<string, string> _Attachments = new Dictionary<string, string>();
  _Attachments.Add(_PSID, _FileName); 
  _Mailer.Send(_Message, _Attachments);

Isn’t there a way to check who has it locked?

I assume you already did that and that’s why you’re asking this question, but I don’t like to assume so I’m asking.

The user locking the file is the user the application server is running under.

1 Like

You could read the file yourself and send the attachment as a stream.

5 Likes