Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
sending emails from JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Mon Mar 15, 2010 2:39 pm    Post subject: sending emails from JCL
Reply with quote

Hello

I'm trying to send email:

HELO mvshost
MAIL FROM: <James@xyz.COM>
RCPT TO: <john06@xyzcom>
DATA
FROM: James@xyz.COM
TO: john06@xyzcom
SUBJECT:HI

but getting mail delivery failure email with below msg

Unable to deliver mail to some/all recipients.
050 FROM: James@xyz.com
500 Unknown command, 'FROM'
050 TO: john06@xyz.com
500 Unknown command, 'TO'
050 SUBJECT:HI
500 Unknown command, 'SUBJECT'
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


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

PostPosted: Mon Mar 15, 2010 2:53 pm    Post subject:
Reply with quote

Please search the Forum on "SMTP" and author as "Robert Sample" or "superk".
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Mon Mar 15, 2010 4:51 pm    Post subject:
Reply with quote

Right off the bat, I can state that if you have posted exactly what you're using for the email, it is not correctly formed per RFC 2821 and therefore will never be sent. The RCPT TO must be <mailbox@domain> where domain is a dot-separated field. Without the dot, the email recipient is invalid and therefore the entire email is invalid.

Furthermore, if you want assistance why are you not posting the responses from the HELO forward? They can be significant.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Mon Mar 15, 2010 8:03 pm    Post subject: sending emails from JCL
Reply with quote

hi
Have a look on the attachment that i posted before.
The RCPT field , i was using the correct address, but did a writing mistake before.

i am still getting the same error.

HELO PLIPC3E
MAIL FROM: <James@xyz.COM>
RCPT TO: <john06@xyz.com>
DATA
FROM: James@xyz.COM
TO: john06@xyz.com
SUBJECT:HI

ERROR that i am getting to my mail box is

Unable to deliver mail to some/all recipients.
050 DATA hi
501 Syntax Error. No Args after 'DATA' command
050 FROM: <James@xyz.COM>
500 Unknown command, 'FROM'
050 TO: <john06@xyz.com>
500 Unknown command, 'TO'
050 SUBJECT:eec record missing
500 Unknown command, 'SUBJECT'

** Text of Mail follows **
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Mar 15, 2010 8:18 pm    Post subject: Reply to: sending emails from JCL
Reply with quote

You need to look for data in your input data stream that's not supposed to be there (do you have NUM ON enabled, for example).
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Mon Mar 15, 2010 8:20 pm    Post subject:
Reply with quote

1. You have line numbers in your file. Line numbers are mainframe-specific and are not recognized by SMTP. Turn them off and delete everything in columns 73 through 80 of your input file.

2. DATA must be on a line by itself -- nothing else on the line. The output you are showing does not match the input you posted, as it shows DATA hi 00031014 -- the hi would be invalid, just as the 00031014 line number is invalid.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Tue Mar 16, 2010 2:55 pm    Post subject:
Reply with quote

thankx . now its working.....

now one more thing , i want to send a file through attachment
i am using the below code , which is posted before ..

JOB HREJ40XX COMPLETED(SEE ATTACHMENT)
WORK UNIT REC W/O CLAIM REC
MIME-VERSION:1.0
CONTENT-TYPE:TEXT/PLAIN
CONTENT-DISPOSITION:ATTACHMENT;FILENAME=FILE.TXT
// DD DSN=TDSCM.TIAJ567.SYSIN(EECMISNG),DISP=SHR
// DD DSN=TDSCM.TIAJ567.SYSIN(PERIOD),DISP=SHR
//

here i am getting all the things as a mail content. no attachment.
can u give some idea...
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Tue Mar 16, 2010 4:28 pm    Post subject:
Reply with quote

hy janmejay,

you want to know, the right smtp syntax,
with all mime extensions ans so on...

this will be a big task...

but if you only want to send text files,
just think, the text will be in the smtp stream
if plain or attached, does not matter!
if you have binary files, makes more sense
to attach them, i.e. zip, pdf ...

but i will give you a piece of advice...
google fpr XMITIP, you will find a freeware, which
will enable to send host files thru smtp in exactly
the way you need. We use this inhouse! It is FREE!

regards,
martin9
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Tue Mar 16, 2010 4:58 pm    Post subject:
Reply with quote

Code:
MIME-Version: 1.0
Content-Type: text/plain
Content-Disposition: attachment; filename=file.txt
// DD DISP=SHR,DSN=???
// DD DISP=SHR,DSN=PERIOD.FILE
This works for me and sends the text file as an attachment named file.txt. If yours is not working, you should get with your site support group to work out what the problem is.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sending email from jcl using the mail... niloyarp JCL & VSAM 5 Tue Oct 10, 2017 12:32 pm
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts How to sending system service request... lind sh IMS DB/DC 5 Sun Apr 10, 2016 12:02 am
No new posts Issue in sending zip file as mail att... ajithajt JCL & VSAM 8 Thu Apr 07, 2016 9:11 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us