Home > AS/400 Tips > iSeries programmer tips > A second look at sending messages from your iSeries via SMTP
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

A second look at sending messages from your iSeries via SMTP


Richard Ewasienko
01.03.2006
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


I've recently seen a lot of tips on "Sending messages from your iSeries via SMTP." While all of these tips are valid, to me they contain one vital flaw. They all require your iSeries to be running the SMTP server daemon. While this might be OK for some, in most shops today with heavy security requirements, our shop included, running services on servers that are not required for strategic operations is prohibited. i.e.: No FTP or SMTP unless you can prove 110% there is no other way.

If you find yourself in this situation, do not despair. Turn that "DOH", into a "WHO HOO" ;P

There are a few products out there that can send SMTP messages to a server without the SMTP server daemon running on your iSeries. Some are freeware, some are shareware, and some are just too much money for what you get.

You can go the vendor software route like the other thugs in "Sector 7 G" or you can write your own application to send messages via SMTP WITHOUT a lot of money or time.

How do I do this you ask? Simple, you use the IBM TCP/IP Socket Client APIs.

The TCP/IP Socket Client APIs, supplied with a complete programming guide and packaged as a stand-alone library, are comprised exclusively of middleware which provides the TCP/IP data exchange and other interfaces for socket programming. The APIs offer ease of implementation of a client application and calls to the APIs may be written in any iSeries high-level language including RPG, COBOL and C. With a little effort, a working sockets application can be tossed out in no time.

Now that you know what the TCP/IP Socket Client APIs are, where do you get them?

Here is the how to in five simple steps:

1. Logon to the IBM Client Technology Center (CTC) website.

2. Request a freeware copy of the IBM TCP/IP Socket Client APIs.

Yes that is right, FREEWARE and IBM sometimes do occur.

3. Go for a break and await the e-mail from IBM.

4. Upon arrival of e-mail and related software, read the complete Programming Guide supplied by IBM. "AS/400 General Purpose TCP/IP Socket Server II Programming Guide" This step cannot be skipped. If you do not read the manual then you will be out of luck.

5. Using the example code provided, modify, compile, and "Wa La" your SMTP solution.

For purposes of this tip, there is no way I can provide you with a "Monkey Can Key It In Solution". (McKiis) With a solution available in RPG, C, COBOL or even CL if you wished to push the envelope I would never have enough space.

What I can provide you with is the location of the APIs listed above. A bit of reading, a little thought and maybe a donut or two, most administrators with some RPG or C skills should be able to implement this process or at the very least evaluate this solution to decide if running a SMTP server daemon on the iSeries is worth the risk and overhead or if this solution will fit the trick.

Another day...another code cut. The cosmic ballet... goes on.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries programmer tips
Enhancing RPG with external SQL stored procedures
Tracking data changes on IBM i with triggers
Introduction to SQLRPGLE on IBM i: Making a report
Implementing a browser interface in COBOL: Displaying database fields
Taking advantage of CL advancements, starting with V5R3
TAATOOL: Useful tools for programmers on IBM i
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
Making the most of RPG data handling on IBM i
Groovy programming on IBM i

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts