Server Side Programming for Email Generation

Try this type of code:

	//var mailer = this.GetMailer(async: true);
	var mailer = new Ice.Mail.SmtpMailer(this.Session);
	var message = new Ice.Mail.SmtpMail();
	message.SetFrom("me@epicor.com");
	message.SetTo("jack@epicor.com");
	message.SetCC("jill@epicor.com");
	message.SetBcc("ghost@epicor.com");
	message.Subject="Test Subject";
	message.Body = "Body Text";
	mailer.Send(message);
	
	//Add Attachments
	Dictionary<string, string> attachments = new Dictionary<string, string>();
	attachments.Add("AttachmentInfo", @"\\MyServer\MyFolder\MyFile.csv");
	mailer.Send(message, attachments);
1 Like