IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sending mail from Mainframe


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Tue Sep 09, 2008 4:58 pm
Reply with quote

i am trying to implement the mainframe email concept. this is the my job.

//SENDNOTE EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP),DCB=(RECFM=F,LRECL=80)
//SYSUT1 DD *
helo MVSHOST
mail from:<userid@mvshost>
rcpt to:<username@pop3.gmail.com>
data
From: userid@mvshost
To: username@pop3.gmail.com
Subject: Test message from MVS using SMTP
This is a line in the body of the note.

while executing this job i am getting this message,

DATA SET UTILITY - GENERATE
IEB368I SYSTEM DETERMINED BLKSIZE USED FOR OUTPUT

PROCESSING ENDED AT EOD

can any one help me to how to implement the mainframe email concept in mainframe.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Sep 09, 2008 5:05 pm
Reply with quote

The message you got is for information only (you didn't specify any block size at SYSUT2).

Are there any other messages? Have you confirmed with your system programmers that your SMTP class is B?

O.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 09, 2008 5:12 pm
Reply with quote

You really need to talk to your systems programmers. They have to set up parameters in TCP/IP to permit SMTP to function, and these values differ from system to system so we cannot provide a whole lot of information about setting it up. Furthermore, look up RFC 2822 on Google to get the message format -- a period on a line by itself at the end of your email is not optional, for example.
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Tue Sep 09, 2008 5:19 pm
Reply with quote

check this link, might help you
www.planetmvs.com/mvsmail/
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Tue Sep 09, 2008 7:16 pm
Reply with quote

Hello,

You can start here, and/or search the Forum for this topic.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Tue Sep 09, 2008 7:20 pm
Reply with quote

Take a look at one of these:

www.ibmmainframes.com/viewtopic.php?t=225
www.ibmmainframes.com/viewtopic.php?t=3902
www.ibmmainframes.com/viewtopic.php?t=4475
www.ibmmainframes.com/viewtopic.php?t=4667
www.ibmmainframes.com/viewtopic.php?t=6057
www.ibmmainframes.com/viewtopic.php?t=2779
www.ibmmainframes.com/viewtopic.php?t=7118
www.ibmmainframes.com/viewtopic.php?t=8686
www.ibmmainframes.com/viewtopic.php?t=8875
www.ibmmainframes.com/viewtopic.php?t=10808
www.ibmmainframes.com/viewtopic.php?t=3783
www.ibmmainframes.com/viewtopic.php?t=12973

and this:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B950/6.0?DT=20050708142126

and this:

ftp.rfc-editor.org/in-notes/rfc2821.txt


BTW, I think this topic is no more eligible for discussion in this forum..check this..
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Tue Sep 09, 2008 8:18 pm
Reply with quote

Hi ofer I checked with sysadmin the smtp class is B only.Also I configured the SMTPCONF job to meet my installation and started the SMTP task then what else I need to do for sending mail from MVS .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 09, 2008 8:46 pm
Reply with quote

Once the SMTP task is started, use IEBGENER or other utility to copy your email to SYSOUT=(B,SMTP). Remember to follow the RFC 2822 requirements. SMTP will usually pick up the spooled output within a minute or two (depending on system load, priority, etc) and process it to the mail server it is sending to. At that point it'll depend on routing, email size, and so forth as to how long it takes to get there.

If your email isn't going across, look at the SMTP started task log for possible errors; you can also review the NOTE and ADDRBLOK files under the HLQ specified in your SMTP configuration. If you're really having problems, enable debugging in the SMTP configuration and review the detail results in SYSDEBUG DD name for further information.
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Wed Sep 10, 2008 8:38 pm
Reply with quote

Hi Robert i checked with SMTP started task. its working fine only also i am getting this message in Log file "IBM MVS SMTP CS V1R7 on Wed, 10 Sep 08 20:17:31 EST".

In SYSDEBUG i got this msg,

IBM MVS SMTP CS V1R7 on Wed, 10 Sep 08 20:17:31 EST
-1< EXITPARMS VER 1 ACTN 1 USER TOKEN 0 IPADDR 0 DLEN 0 SAFTOKEN ADDR
-1> USER EXIT RETCODE 4

and how to check whether mail from mainframe is working or not.

can any one send the SMTPCONF file which is working properly or send the documentation/checklist for implementing mainframe mail concept.Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Sep 10, 2008 11:00 pm
Reply with quote

Code:
 -1< EXITPARMS VER 1 USER TOKEN 0 IPADDR 0 DLEN 0 SAFTOKEN ADDR 0
 -1> USER EXIT RETCODE 4
shows up in our SYSDEBUG so it appears that your SMTP task is starting okay.

When you send an email, you should see messages in SYSDEBUG along the lines of
Code:
257> 220 MAINFRAME.******** running IBM MVS SMTP CS V1R8 on Wed, 10 Sep 08 0
257< HELO MAINFRAME
257> 250 MAINFRAME.******** is my domain name.  I've never heard of you!
257< MAIL FROM:<sourceaddress@********.COM>
257> 250 OK
257< RCPT TO:<somebody@********.COM>
257> 250 OK
257< DATA
257> 354 Enter mail body.  End by new line with just a '.'
257> 250 Mail Delivered
The lines with the > mark data from the mainframe, the lines with the < are email data or responses from the mail server.

So when you try to send an email what does your SYSDEBUG show?
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Thu Sep 11, 2008 12:37 pm
Reply with quote

Hi Robert ,
please find the below screen shot for JCL i used to send the mail,
and when i tried to send the mail I can able to see only the following message from SMTP SYSDEBUG.Let me know what else i want to do?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Thu Sep 11, 2008 12:51 pm
Reply with quote

lease do not post images,
a plain text cut and paste gives he same info with less bandwidth utilization
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 11, 2008 5:07 pm
Reply with quote

Are you seeing any messages in the message log for the SMTP job? We see messages sometimes like
Code:
EZA5477E 09/11/08 02:01:06 Unable to Deliver Note 00000006 to <????????@********.com>


Also, are the NOTE and ADDRBLOK files hanging around or going away?
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Thu Sep 11, 2008 6:44 pm
Reply with quote

hi robert.. i am not seeing any message like
"EZA5477E 09/11/08 02:01:06 Unable to Deliver Note 00000006 to <????????@********.com>"
from SMTP message log also NOTE and ADDRBLOK files are not located in the volume.
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Mon Sep 15, 2008 12:11 pm
Reply with quote

Hi All,
Now i can able to send the mail.But the problem is i can able to send the mail to within the same MVSHOST. if i am trying to send the mail to other SMTP server like Gmail i am getting the following errors,

Subject: Undeliverable Mail

MVSHOST unable to deliver following mail to recipient(s):
<USERID@SMTP.GMAIL.COM>
MVSHOST received negative reply:
552 Too many hops - threshold exceeded

** Text of Mail follows **
Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R7)
with TCP; Mon, 15 Sep 08 11:54:25 EST
Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R7)
with TCP; Mon, 15 Sep 08 11:54:23 EST
Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R7)
with TCP; Mon, 15 Sep 08 11:54:22 EST
Received: from HCLZOSB (10.108.45.153) by HCLZOSB (IBM MVS SMTP CS V1R7)
with TCP; Mon, 15 Sep 08 11:54:20 EST
Received:from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R7)
***

This is the message i am getting from SYSDEBUG of SMTP,

2< MAIL FROM:<userid@MVSHOST>
2> 250 OK
0< 250 OK
0> RCPT TO:<USERID@SMTP.GMAIL.COM>
2< RCPT TO:<USERID@SMTP.GMAIL.COM>
2> 250 OK
0< 250 OK
0> DATA
2< DATA
2> 354 Enter mail body. End by new line with just a '.'
0< 354 Enter mail body. End by new line with just a '.'
2> 552 Too many hops - threshold exceeded
0< 552 Too many hops - threshold exceeded
0> QUIT
2< QUIT
2> 221 MVSHOST running IBM MVS SMTP CS V1R7 closing connection
0< 221 MVSHOST running IBM MVS SMTP CS V1R7 closing connection
2> Server connection closed: reason Foreign host aborted the connection.

Can any one help me to resolve this problem.Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Mon Sep 15, 2008 5:13 pm
Reply with quote

Did you try sending to <USERID@GMAIL.COM>? Most mail is sent to an actual address; the mail server handles SMTP without requiring an explicit destination of SMTP.domain.name.
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Mon Sep 15, 2008 5:45 pm
Reply with quote

Yes Robert, I also tried that, but i got same error msg...

0> 552 Too many hops - threshold exceeded
1< 552 Too many hops - threshold exceeded
1> QUIT
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Mon Sep 15, 2008 6:37 pm
Reply with quote

The 552 message implies there's a problem with your routing table; possibly a loop in the network? If you go to your mainframe OMVS and do a ping on a common site, what do you get back? I suspect if you get the TCP/IP definitions right, the SMTP problem may go away.
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Tue Sep 16, 2008 4:54 pm
Reply with quote

Yes when trying to send the mail to Gmail it's goes into loop mail,
and its created the dataset called 'SMTP.CONN0.LOOPMAIL' in the system.
this dataset contains the looping message's like,

Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R
with TCP; Tue, 16 Sep 08 14:11:58 EST
Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R
with TCP; Tue, 16 Sep 08 14:11:56 EST
Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R
with TCP; Tue, 16 Sep 08 14:11:54 EST
Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R
with TCP; Tue, 16 Sep 08 14:11:52 EST
Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R
with TCP; Tue, 16 Sep 08 14:11:51 EST
Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R
with TCP; Tue, 16 Sep 08 14:11:49 EST
Received: from MVSHOST (xx.xxx.xx.xxx) by MVSHOST (IBM MVS SMTP CS V1R
with TCP; Tue, 16 Sep 08 14:11:45 EST

Date: 16 Sep 08 14:10:22 IST
From: USERID@MVSHOST
To: USERID@GMAIL.COM
Subject: TEST GMAIL

GMAIL TEST MSG

Also how to do a ping on a common site? Do u have any common site IP address,
when i am tried to PING on my/other system which is connected to the local network
i can get the folowing msg,

$ ping 10.108.39.212
CS V1R7: Pinging host 10.108.39.212
Ping #1 response took 0.010 seconds.
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Thu Sep 18, 2008 9:58 am
Reply with quote

hi Robert, any info about this....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 18, 2008 5:29 pm
Reply with quote

PING doesn't require an IP address; you could ping Use [URL] BBCode for External Links for example -- which would be a good test.

If you've got a loop in your network definition, you've got to get with your network people to get it straightened out before the email will go.
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Mon Sep 22, 2008 2:27 pm
Reply with quote

Hi Robert & all, Now i can able to send the mail, Thanks a lot for your valuable support.I am always looking forward your coperation.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Mon Sep 22, 2008 5:20 pm
Reply with quote

Arun: what was the problem? Knowing the solution might prevent someone else from having a problem in the future.
Back to top
View user's profile Send private message
arunkumarvks

New User


Joined: 16 Jun 2008
Posts: 30
Location: Chennai

PostPosted: Tue Sep 23, 2008 2:41 pm
Reply with quote

In my firm firewall are installed. so i cant able to sent mail into the other mail server.so that the network administrator configured my mainframe SMTP server IP address into their firewall.This is the solution for that problem.Thnaks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Sep 23, 2008 9:07 pm
Reply with quote

Good to hear it is working - thank you for posting the solution icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Email attachment from mainframe is empty PC Guides & IT News 9
No new posts Mainframe Dataset Binary or ASCII Mainframe Interview Questions 4
No new posts Need help In Mainframe Automation AF/... CLIST & REXX 14
No new posts SPOOL to Mainframe dataset in batch mode JCL & VSAM 7
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
Search our Forums:

Back to Top