Nathan,
Oh dear, I forgot to mention 2 setup steps -

1. U need to create an INI file containing the address of your SMTP server.

CRTSRCPF FILE(QGPL/INI) MBR(DB2WWW)
Then add the following line into the DB2WWW member (my SMTP server is at mail1.corp.int)
DTW_SMTP_SERVER mail1.corp.int

2. Then set your current directory to the location of the ini file before calling QHTTPSVR/DB2WWW
CD DIR('/qsys.lib/qgpl.lib')

Then u r set to go.

Here's a sample script named that should send a response back to this forum. I'll run it from the command line after sending this reply.
%define HTML = { <html><body><table>
<tr><td>Hi there Nathan</td></tr>
<tr><td>This is an HTML formatted email sent from DB2WWW</td></tr>
</table></body></html>
%}
%html(send) {
@dtw_assign(sndaddr,"peter.connell@xxxxxxxxxx")
@dtw_assign(rcvaddr,"midrange-l@xxxxxxxxxxxx")
@dtw_assign(rcvaddr,"peter.connell@xxxxxxxxxx")
@dtw_assign(subject,"RE: Looking for email package recommendations on the i")
@dtw_sendmail( sndaddr, rcvaddr, HTML, subject,"","","","","","","html")
%}

Peter


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Nathan Andelin
Sent: Friday, 21 December 2012 1:09 p.m.
To: Midrange Systems Technical Discussion
Subject: Re: Looking for email package recommendations on the i

Very well, I'll try that. Thanks for the tip.

-Nathan



----- Original Message -----
From: Peter Connell <Peter.Connell@xxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Cc:
Sent: Thursday, December 20, 2012 5:02 PM
Subject: RE: Looking for email package recommendations on the i

Yep e.g.

ADDENVVAR ENVVAR(PATH_INFO) VALUE('/home/demo/macros/icecream/report')
  Environment variable added.                                           
call qhttpsvr/db2www dsppfm stdout

A default *SRCF named STDOUT is created in QTEMP with any output from the script (that would normally be sent to the browser if called from Apache) But If u do a CRTPF QTEMP/STDOUT rcdlen(256) first then u get just the raw output, if any.

Peter
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

#####################################################################################

This correspondence is for the named person's use only. It may contain confidential
or legally privileged information, or both. No confidentiality or privilege is waived
or lost by any mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not disclose,
copy or rely on any part of this correspondence if you are not the intended recipient.
Any views expressed in this message are those of the individual sender, except where
the sender expressly, and with authority, states them to be the views of Veda.
If you need assistance, please contact Veda on either :-
Australia 1300-762-207 or New Zealand +64 9 367 6200

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.