You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Regarding sendmail function

5 replies [Last post]
peoplekishore's picture
User offline. Last seen 16 weeks 4 days ago. Offline
Joined: 05/13/2008
Posts: 11

Hi,
What are all the prerequisites to use sendmail function in peoplecode?
r u we able to write content line by line in sendmail funcn?
waiting for ur responces,
thanks in advance.

nitin_hexa's picture
User offline. Last seen 15 weeks 4 days ago. Offline
Joined: 07/22/2008
Posts: 14
Re: Regarding sendmail funcn

hi,
the first prerequisite is that ur SMTP server should be configured.
I have used it from 3 tier triggering from online push button. u can see the code below for ur reference.

&MAIL_FLAGS = 0;
&MAIL_TO = &mail_t;
&MAIL_CC = &mail_c;
&MAIL_BCC = "";
&MAIL_SUBJECT = "Request ID #" | CR_EMAIL_REC.CR_ID | " Approved - Request for " | &LN | ", Dept - " | CR_EMAIL_REC.CR_DEPTID;
&MAIL_TEXT = "Hi, Please find the attached Requestion Form";
&MAIL_FILES = "/disk2/psreports/PSFSDEV/" | &DOR | "/" | &CONTENTID | "/" | &FILENAME;
REM &MAIL_FILES = "/disk2/psreports/PSFSDEV/20080714/" | &CONTENTID | &FILENAME;
&MAIL_TITLES = &mail_title;
rem &MAIL_SENDER = "psadmin@psoft.com";
&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES);

If Not (&RET = 0) Then
WinMessage("Return status from mail = " | &RET);
End-If;

peoplekishore's picture
User offline. Last seen 16 weeks 4 days ago. Offline
Joined: 05/13/2008
Posts: 11
Re: Regarding sendmail funcn

How to get line by line in mail text?

nitin_hexa's picture
User offline. Last seen 15 weeks 4 days ago. Offline
Joined: 07/22/2008
Posts: 14
Re: Regarding sendmail funcn

Hi,
I had also same reuirement once ..then i used Worflow in that.
May be some one can help us in this regard.

Regards
Nitin Khanna

abhi10aug's picture
User offline. Last seen 4 weeks 6 days ago. Offline
Joined: 06/11/2008
Posts: 10
Re: Regarding sendmail function

Hi Kishore,
What actually you mean when you say line by line? I think you can use new line character while creating text body for email. Sendmail is a good function but if it does not work then you can use the mail class also.

Regards
Abhinav
Love , Live , Laugh , Smile and Enjoy

Guest's picture
Guest (not verified)
Re: Regarding sendmail function

HI ,
Thank you very much nitin hexa first of all.
And i achieved my requirement through sendmail function.one small trick helps me to print line byline the trick is
&newline="
";
hope u understood this.
Thanks&regards,
Kishore.P

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.