Hi,
What options we have to send emails ugins extensions?
Before Cloud I used "LN eMessage Connector API to construct and send an meeting request over SMTP" but it has functions not trusted for Cloud environment.
Regards.
Hi João,
I am curious what others have to suggest for this.
I have not tried it and maybe there is a much easier way, but I am wondering if the 'Document Output Management' could be utilized. A Document Type could be created to send an e-mail to a Business Partner, Contact, Employee, or User. This Document Type is getting linked to a reports with a Report Rule. When the report is printed to the 'Document Output Management' (DOCMAN) device, it would trigger sending the e-mail.
Another option to review might be to check if ION can send custom e-mails and trigger this with a custom BOD. There are public interfaces to publish a BOD from LN.
Yours, Stephan
Hi Stephan,
thanks for your suggest.
DOCMAN is not the option for me, because I want to send an email based on some conditions on a "Before Save" Hook of a table extension.
BOD could be a way, but I cannot use BODS for now.
@jdsilva , You can use the cmf.sendMail()
string to.list(100,3) string cc.list(100,2) string bcc.list(100,1) string att.list(100,2) string att.mime.list(30,2) long result to.list(1,1) = "jsmith" |* LN user to.list(1,2) = "jane78@gmail.com" |* mail address only to.list(1,3) = "Paul M. Gibson <paul.m.gibson@acme.com>" |* user name and mail address cc.list(1,1) = "sales.office.atlanta@acme.com" cc.list(1,2) = "Ben Winston <ben.winston@acme.com>" bcc.list(1,1) = "kc23@gmail.com" att.list(1,1) = path.combine(bse.appdata.dir$(), "invoice.pdf") att.list(1,2) = path.combine(bse.appdata.dir$(), "readme.txt") att.mime.list(1,1) = "application/pdf" att.mime.list(1,2) = "text/plain" result = cmf.sendMail( "donotreply@acme.com", |* sender "Your invoice with number 123456", |* subject to.list, |* 'to' recipients 3, |* number of 'to' recipients cc.list, |* 'cc' recipients 2, |* number of 'cc' recipients bcc.list, |* 'bcc' recipients 1, |* number of 'bcc' recipients path.combine(bse.appdata.dir$(), "body.htm"), |* path to file used as the body "text/html", |* body mime type att.list, |* paths to attachment files att.mime.list, |* mime types of attachments 2) |* number of attachments if result = 0 then |* success else |* error; DAL error message has been set endif
Hi Fabiano,
I have already tried cmf.sendMail() with no sucess. I think it only works for LN 10.8 or LNCE.
I am on 10.7 tools. In the future certainly I will use on LNCE.
It works in LN CE. I’ve used this functionality in many customizations.