joraboy328
27th September 2010, 04:11
Hi everyone
Is there any email functions or api in BaaNVIC4?Thanks

joraboy328
27th September 2010, 04:11
Sorry It's BaaNIVc4

mark_h
27th September 2010, 15:44
Not that I am aware of - you can search this forum for mail to see some of the solutions.

grzegorz
27th September 2010, 16:58
You can try this (Unix):


body = sprintf$ ("%s\n%s\n%s\n%s\n%s\n%s\n",
strip$(line_email1),
strip$(line_email2),
strip$(line_email3),
strip$(line_email4),
strip$(line_email5),
strip$(line_email6)) | or more, if required...

cmdline = sprintf$ ("echo ""%s"" | mail -s ""%s"" %s",
strip$(body),
strip$(subject),
strip$(email_addr))
err = shell (bufor, 0)
if err<>0 then
< something was wrong>
else
< email sent >
endif

BaanInOhio
27th September 2010, 19:02
Since the email processor varies by OS, and may have more than one option per OS, Baan probably left the email piece (at least in Baan IV) to third parties or the customer.

When designing an email process, you will need to determine the OS commands that you will use to send the email and how/where the email process will be used. I put the email commands in an DLL exten function that accepts arguments for the recipients, the subject, reference to text for the body of the email (optional), file to be attached to the email (optional). Custom Baan table(s) can be used to store the recipient(s) by customer, supplier, etc. Another DLL function can be used to build the recipient string by the customer/supplier/etc and a subject by the session calling the email DLL. If sending invoices and POs, you might want to include a mechanism for saving a copy of the email to use for customer/supplier disputes. You probably also want to store an internal email recipient in a parameter table by company to use for the sender ('from') of your emails. This is the recipient that will receive failure messages.