Professional Documents
Culture Documents
In this post I’ll show you how to send a mail from adonix
code in Sage X3.
The points we will face are:
1) Meladx/Send introduction
2) Sending through meladx (the best way for me: at the
end with just a single code line you send a mail!)
3) Sending through Workflow
4) Sending through ENVOI_MAIL(…) From AWRKMEL
To: recipient@example.net
Best regards
# sagedev.it
NAMEFILE = "mail_text_"+num$(adxpid)
PATH = "YSAGEDEV\TMP"
EXTENSION="TXT"
NAMEFROM= vireblc(NAMEFROM,2)
If NAMEFROM=""
NAMEFROM=ADRFROM
Endif
End
# Application/others ; name="TEST1.pdf"[TEST1.pdf]
"C:\temp\TEST1.pdf"
# Application/others ; name="TEST2.doc"[TEST2.doc]
"C:\temp\TEST2.doc"
2. create a YMAIL workflow (GESAWA
function)
o set event code as YMA
o Event type: “Miscellaneous”,
o in the “Management” box of
“General” tab check “Trigger
Mail field”
Sage v9 – GESAWA Sending mail Workflow
o in the “Recipient” tab insert a line
with “User” as Type
and GYRECIPIENT as Recipient
(GYRECIPIENT is a global variable
that will be defined by program),
Send mail “Yes” and the other fields
“No”
Kill GYRECIPIENT
Kill GYOBJECT
Kill GYMAILTEXT
GFILPATH+";"+GYFILE2