I know many of you have done this and we are getting ready to do this here. We want to be able to generate invoices and then automatically email them to the customer. What are you using to accomplish this? We also want to be able to send off shipping documents and other docs at various times or various points within our process.
I do not care if it is expensive, cheap is always good…and if it doesn’t require a lot of work that is always best! But right now I am looking at what options are out there to do this. Thanks! Manasa
Your best bet is APM though in 10.1 epicor introduced some advanced document routing to auto print.
I know u guys are not in 10.1 yet, but it might be worth t the jump for this feature
To elaborate major difference is data you want used in the emails as content from APM you are basically doing a screen scrape it has to be on the report somewhere static can’t move. With the solution in 10.1 you are using metadata from the dataset and can pretty much do whatever the hell you want.
If you have access to an SMTP email server, it is pretty straightforward to send email using custom C# code in BPM (I have never used built in EMAIL object). I can share code if you like.
You could always generate your report to a local PDF, then attach it in email.
This is the code I used within a form customization - It should be the same except for in a BPM you can use MssageBox.Show, you have to use the ICE message box. I hope this helps! I would also like to note, you can use your GMAIL account for SMTP as well if you use the right settings. -Chris
SmtpClient smtpClient = new SmtpClient();
NetworkCredential basicCredential =
new NetworkCredential("uremail@domain.com", urpassword);
MailAddress fromAddress = new MailAddress("WhoIsSender@domain.com");
smtpClient.Host = "mail.yourSMTP.com";
smtpClient.Port = 25;
smtpClient.UseDefaultCredentials = false;
smtpClient.Credentials = basicCredential;
MailMessage message = new MailMessage();
//-------> THIS IS WHAT YOU WANT! ---->message.Attachments.Add(new Attachment(PathToAttachment));
message.From = fromAddress;
message.Subject = "Testing customiztion from E10";
//Set IsBodyHtml to true means you can send HTML email.
message.IsBodyHtml = true;
message.Body = "<h1>This was created from within EPICOR..</h1><BR>On the receipt entry screen";
message.To.Add("receipient1@domain.com");
try
{
smtpClient.Send(message);
}
catch(Exception ex)
{
//Error, could not send the message
// Response.Write(ex.Message);
MessageBox.Show(ex.Message);
}
Pretty nice @Chris_Conn ,
For what its worth if you are in a BPM you can use the built in Epicor Mailer class to send SMTP email with attachments. This makes it a little simpler since it will use the configured Epicor SMTP settings that you’ve already established when you setup Epicor.
var mailer = this.GetMailer(async: true);
var message = new Ice.Mail.SmtpMail();
message.SetFrom("email@email.com");
message.SetTo("email1@email.com;email2@email.com");
//message.SetCC()
//message.SetBcc()
message.SetBody("<html><body><p>MyMessage Here</p></body></html>");
Dictionary<string, string> attachments = new Dictionary<string, string>();
attachments.Add("MyFirstAttachment", @"\\MyServer\myFolder\MyFile.pdf");
mailer.Send(message, attachments);
Nice, I have never used the email object - I have no control over the system configuration so I wasn’t sure if an SMTP was even configured. For future reference, is that simply configured in the SYSCONFIG? I think I saw some params for that.
thanks for this great information. I need assistance on this, this is the scenario:
I have a csv file in this location:
E:\Epicor\EpicorData\Companies\iei\BankVendorFile\Live\LiveVendor.txt
My server name is : ERP10-APP
I already tried
@"\Epicor\EpicorData\Companies\iei\BankVendorFile\Live\LiveVendor.txt"
@"\ERP10-APP\Epicor\EpicorData\Companies\iei\BankVendorFile\Live\LiveVendor.txt"
and does not work, no even email received.
but if I try :
@“E:\Epicor\EpicorData\Companies\iei\BankVendorFile\Live\LiveVendor.txt” , i works but i am getting an attachment that is not the one I want. it is like an video recorder installation program .dat
I am confuse because I do not where Epicor is attaching this program from.