× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



 

For this to work then, do you have to have your HTTP server up and running
all of the time?  And are you sending mail through it?  Is it routing
through HTTP and then on to the Exchange server, instead of SMTP?

 

Debbie Kelemen

Sr. Programmer/Analyst

 

(719) 272-2617

email:  <mailto:dkelemen@xxxxxxxxxxxxxxxx> dkelemen@xxxxxxxxxxxxxxxx

web:  <http://www.chefscatalog.com/> www.chefscatalog.com

 

 

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Peter Connell
Sent: Friday, August 04, 2006 2:35 AM
To: RPG programming on the AS400 / iSeries
Subject: 

 

Mike,

No download, no install required.

Just enter the commands below on a command line.

All you need to know is the domain name or IP address of your email

server. For example, we use an Exchange server at

nzaklbh-ex0001.corp.bayadv

 

1. Create an INI file

    CRTSRCPF FILE(QGPL/INI) RCDLEN(240) MBR(DB2WWW)

2. Load your SMTP server name using EDTF

   EDTF FILE(QGPL/INI) MBR(DB2WWW)

   and add the following line 

   DTW_SMTP_SERVER nzaklbh-ex0001.corp.bayadv

3. Create a script to call the email function

   EDTF FILE(Qgpl/INI) MBR(EMAILTEST)

   and add the following line to create a simple script

   %html(macro) { @dtw_sendmail("koldark@xxxxxxxxx",emailTo,emailMsg) %}

4. Load the path to your email script

   ADDENVVAR ENVVAR(PATH_INFO) REPLACE(*YES)

   VALUE('/qsys.lib/qgpl.lib/ini.file/emailtest.mbr/macro') 

5. Set the value of parameters for emailTo and emailMsg 

   ADDENVVAR ENVVAR(QUERY_STRING) REPLACE(*YES)

   VALUE('emailTo=peter.connell@xxxxxxxxxxxxxxxxxxxx&emailMsg=Good

morning') 

6. Change to the directory where you put the INI file

   cd '/qsys.lib/qgpl.lib'

7. Run Net.data

   CALL QHTTPSVR/DB2WWW

That's it, the email should be sent.

Steps 1-3 need only be one-time for configuration.

Steps 4-7 can be compiled into a program.

 

This is a fully supported IBM feature that comes with any iSeries.

The documentation for DTW_SENDMAIL is at

http://www-03.ibm.com/servers/eserver/iseries/software/netdata/db2rn.pdf

 

There are up to 11 parameters.

For instance if you want to send an rtf attachment

@dtw_sendmail("dtwdude","peter.connell@xxxxxxxxxxxxxxxxxxxx","blah

msg","blah subject","  ","   ","","","/www/printversion.rtf")

 

Peter

 

 

 

 

 

----Original Message-----

From: rpg400-l-bounces@xxxxxxxxxxxx

[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike

Sent: Friday, 4 August 2006 9:04 a.m.

To: RPG programming on the AS400 / iSeries

Subject: Sending Email From RPG

 

At my previous job we had MAILTOOL from bvstools.com which I used to

send

email from within RPG programs. While the RPG interface I had was far

from

perfect, it did work. Before I go to my new employer with suggesting

purchasing that same product I want to see what other options there are.

 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.