How To Send Email From The Application System

psmuley

New Member
I've used mailsend in the pass GitHub - muquit/mailsend: A program to send mail via SMTP from command line, because the source code can be compiled for both Windows and Linux which means there is little differece between my ABL code for windows or Linux.

I simply write the body of the email to a text file (in this case MessageBody.txt).

Here is a snippet of code:

Code:
osCommand = SUBSTITUTE('mailsend1.16.exe -smtp smtp.mailserver.com -f santa@northpoll.com -name "Santa" -t &1 -sub "Secret Santa - 13th December" -attach "MessageBody.txt,text/plain,i"', SantaList.santaemail).

          
            OS-COMMAND NO-CONSOLE VALUE(osCommand).

Hi Cecil, Pankaj here. Can you please elaborate on the above code. As such I've not worked much on Progress, but being a developer, always try to explore new things that can help users through my programs. I've learnt progress coding by trials (based on my past experience in other languages), hence the request. I'v been searching for something to send mail from my program during run-time (Environment is Window based and can send mails through OS Command Line, successfully) and i feel this code is suitable for my requirements. I tried to understand the code but still feel something missing. (1) in -attach "MessageBody.txt, text/plain,i" , (2) SantaList.santaemail I couldn't trace (3) What is "i" in the MessageBody string. Your advise will be very helpful for me to boost my coding in Progress. Thanks / Regards Pankaj
 
Top