Professional Documents
Culture Documents
Sending Email in PeopleCode
Sending Email in PeopleCode
com/questions/165978/how-to-extract-the-text-from-ms-office-
documents-in-linux
This is the PeopleCode for sending an email (which you can find in the
PeopleBooks).
Incorporate this in your code and make sure you point the &MAIL_FILES variable to
the location of the file you want to send.
You can basically make the sender / receiver email address a variable as well which
you fill somewhere in your code.
>
&MAIL_FLAGS = 0;
&MAIL_TO = "test@test.com";
&MAIL_CC = "";
&MAIL_BCC = "";
&MAIL_FROM = "";
&REPLYTO = "";
&SENDER = "";
&MAIL_FLAGS = 0;
&MAIL_TO = "uladdha@tva.gov";
&MAIL_CC = "";
&MAIL_BCC = "";
&MAIL_FROM = "noname@TVA.gov";
&REPLYTO = "";
&SENDER = "PY_Dept";
&MAIL_FILES = "C:\test.txt";
&MAIL_TITLES = "Test.txt";
&MAIL_SEP = ";";
&CONTTYPE = "";
End-If;
user10634418
Newbie
&MAIL_FILES = "C:\test.txt";
The test.txt file referenced above will reside on the client or server?
If Server how do we move the file from local client to server via peopleCode?
Like
Show 0 Likes
(0)
Actions
Michel
Specialist
It will reside on the server. You'll have to combine the code from the link you've
provided with the mail functionality.
Once the file is uploaded to the database you'll be able to use this file as an
attachment for the mail.
It should be possible to reference a file attached to the mail in the same way as
the link explains to display it on the page.