fakhruddin
(fakhruddin husain)
November 7, 2023, 2:22pm
1
Does anyone know a way to send a file attachment through email in the Cloud? Although the code is working in On-Prem Server Instances, the same gives an error in 11.2.400 Cloud Instance
In the Cloud (and honestly, even on prem), you should only write to the EpicorData folder. See @klincecum ’s example here:
In a function:
//ref: Ice.Contracts.Lib.ServerPath
//using System.IO;
CallService<Ice.Contracts.ServerPathSvcContract>(serverPathSvc =>
{
List<Ice.Lib.ServerPath.Types.PathInfo> pathInfo = new List<Ice.Lib.ServerPath.Types.PathInfo>();
pathInfo = serverPathSvc.GetPaths(Epicor.ServiceModel.Utilities.SpecialFolder.CompanyData, "", false);
if(pathInfo.Count > 0)
{
string path = $"{pathInfo.First().FullName}\\testing.txt";
File.WriteAllText(path, "In t…