Send Emails in SQR

Your rating: None Average: 4.6 (5 votes)

Here is the piece of code you can use to send email with attachments in SQR.

BEGIN-PROCEDURE sendmail
let $subject = 'Subject of the Email Here'
let $to_list = 'email@email.com'
let $ReportID = 'G:\PeopleSoft\Reports\Report_Name.pdf'
let $alias ='Attachment File Name Alias including the file extension'
let $enter = chr(10)chr(13)
let $body_txt = 'Hi,'$enter$enter'Please Find the Report attached with this email.'$enter$enter'Regards,'$enter 'Peoplesoft Application Support'$enter$enter'PS: We request you not to reply to this automated mail trigger.' let $mail-cmd = 'F:\PSFT819\bin\server\winx86\psmail -TO"'$to_list'" -SUBJECT"'$subject'" -BODY"'$body_txt'" -FILE"' $ReportID '" -ALIAS"'$alias'"'
CALL SYSTEM USING $mail-cmd #Status
end-procedure

You would have to change the value of the variable $mail-cmd based on th path of your PS_HOME.

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.
Feby's picture
Feby (not verified)
Good work man..

Good work man.. keep it up..
Post some articles related to peoplesoft server administration.
Feby

Guest's picture
Guest (not verified)
Re: Send Emails in SQR

is there a flag or switch that can be set so that the users are unable to reply to the email once it is received?

Lepa's picture
User offline. Last seen 3 weeks 2 days ago. Offline
Joined: 06/23/2008
Posts: 565
Re: Send Emails in SQR

Quote:
is there a flag or switch that can be set so that the users are unable to reply to the email once it is received?

Nope, you can't prevent the user from hitting the reply button.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest's picture
Guest (not verified)
Re: Send Emails in SQR

On the -TO parameter, I want to use a file that list several email addresses, what format do I use? I have them currently listed and it only sends to the first one.

Dee's picture
Dee (not verified)
Re: Send Emails in SQR

Thanks. Let me re-phrase - is there a way to flag the sent email such that when the user attempts to reply, the reply will not route?

Lepa's picture
User offline. Last seen 3 weeks 2 days ago. Offline
Joined: 06/23/2008
Posts: 565
Re: Send Emails in SQR

Can't you use an invalid "from" email? What you happen if you tried to do that? Please, lets use the post on the forum to finish this up http://compshack.com/forum/peoplesoft/peoplesoft-technical/sendmail-do-not-reply

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

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.