View previous topic :: View next topic
|
Author |
Message |
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
This post is related to one of previous regarding Rexx Email sending program.
Reference : ibmmainframes.com/viewtopic.php?t=12103&highlight=send+email
While executing the code I am getting the following error message
Code: |
>F> "0 460 500 5.5.1 Command unrecognized: "To:swathy_krishnan
Ümycomp.de "??500 5.5.1 Command unrecognized: " Reply-To: swathy_krishn
anÜmycomp.de "??500 5.5.1 Command unrecognized: " Subject: This is a Test #1 "
??500 5.5.1 Command unrecognized: " X-Mailer: REXX Exec on ZOS "??500 5.5.1 Com |
Could you please help me resolve the issue. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
With the amount of information you have given there is little chance of getting help. |
|
Back to top |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
I think we can consider this post as a continuation of the post which i have mentioned in the post.
Quote: |
next time please start a new topic rather than piggybacking on a year old thread |
I have seen this comment by enrico there and started it as a new post. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
We need to know the code. If it is the code from the original topic, you need to say so. |
|
Back to top |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
Please find the source code below
Code: |
/*rexx*/
trace i
address tso
smtp_server = 'USER1.MAIL'
smtp_from = 'swathy@XXX.de'
smtp_address = 'e'swathy@XXX.de'
smtp_to = 'swathy@XXX.de'
smtp_replyto = 'swathy@XXX.de'
crlf = X2C('0d25')
/* SMTP Initialization */
str = Socket('initialize', Date(B))
Parse Var str sockrc subtaskid maxdesc tcpipuser
str = Socket('Socket', 'af_inet', 'stream', 'tcp')
Parse Var str sockrc sockid
str = Socket('SetSockOpt', sockid, 'sol_socket', 'SO_ASCII', 'on')
server_info = 'AF_INET 25 'smtp_server
str = Socket('Connect', sockid, server_info)
str = Socket('Recv', sockid, 10000)
Parse Var str sockrc data_length smtp_response
msg= 'HELO 'smtp_server crlf
str = Socket('Send', sockid, msg)
str = Socket('Recv', sockid, 10000)
/* Mail Message */
msg = 'MAIL FROM:<'smtp_from'>'Crlf
str = Socket('Send', sockid, msg)
str = Socket('Recv', sockid, 10000)
msg= 'RCPT TO:<'smtp_address'>'crlf
str = Socket('Send', sockid, msg)
str = Socket('Recv', sockid, 10000)
msg= 'DATA'crlf
str = Socket('Send', sockid, msg)
str = Socket('Recv', sockid, 10000)
the_subject = 'This is a Test #1'
msg = 'To:' smtp_to crlf ,
'Reply-To:' smtp_replyto crlf ,
'Subject:' the_subject crlf ,
'X-Mailer: REXX Exec on ZOS' crlf
str = Socket('Send', sockid, msg)
str = Socket('Send', sockid, crlf)
msg = 'Test mail from 'Userid()crlf
str = Socket('Send', sockid, msg)
msg = crlf'.'crlf
str = Socket('Send', sockid, msg)
str = Socket('Recv', sockid, 10000)
/* End of Mail Message */
msg= 'QUIT'crlf
str = Socket('Send', sockid, msg)
str = socket('Close', sockid)
str = socket('Terminate', subtaskid)
Say 'mail send to ' smtp_to
exit;
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
read the REXX manuals about concatenation and continuation lines
and read the original script which worked and compare it to the one You posted
do not change things if You do not understand/know what You are doing |
|
Back to top |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
Hello Enrico
I couldn't see any difference between writing
name = 'SASI'
strng = 'HELLO'name
and
strng ='HELLO'!!name.
Also abuttal symbol is giving the following error message for me
Code: |
msg= 'HELO '||smtp_server || crlf |
Result
Code: |
24 +++ msg= 'HELO '|
13 +++ crlf = X2C('0d25')
IRX0013I Error running TEST, line 24: Invalid character in program
*** |
|
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
As far as i know a "crlf" is :
in stead of :
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
In both EBCDIC and ASCII, X'0D' is CR, but LF is X'25' in EBCDIC and X'0A' in ASCII.
X'0D25' is CR/LF after it has been converted from ASCII. |
|
Back to top |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
I have tried both but still I am getting same error message. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
You appear to have unbalanced quotes in one line of your code
Code: |
smtp_address = 'e'swathy@XXX.de' |
Also looking at the error messages, the @ sign appears to be missing from the email addresses / references
I'm sure that in the past I have encountered a translation problem where the valid abbutal character was ! (exclamation mark) instead of | (pipe) |
|
Back to top |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
.
Quote: |
You appear to have unbalanced quotes in one line of your code
Code:
smtp_address = 'e'swathy@XXX.de'
|
the error occured while editing the code to post here. In source code it is proper.
Quote: |
Also looking at the error messages, the @ sign appears to be missing from the email addresses / references |
Yes, I have noticed the same.swathy_krishnan@mycomp.de has become swathy_krishnanÜmycomp.de in the error message. any thoughts on this? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
check the code page used for Your 3270 emulation. |
|
Back to top |
|
|
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
I agree with Enrico... from
Quote: |
smtp_from = 'swathy@XXX.de'
|
and
Quote: |
swathy_krishnanÜmycomp.de |
it looks suspiciously like the op is working on a "German" based machine . If this is the case he will have to use the appropriate characters.eg
does not exist on a German system you would have to use
|
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Bill Woodger wrote: |
In both EBCDIC and ASCII, X'0D' is CR, but LF is X'25' in EBCDIC and X'0A' in ASCII.
X'0D25' is CR/LF after it has been converted from ASCII. |
Sure Bill, thats when you use IBM SMTP as receiver of the commands, here we are talking rexx sockets. I did see some rexx sockets execs, but crlf's were never used. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
EBCDIC has a CR character at X'25' but an ASCII CR is frequently translated as NL (X'15') instead of X'25'. |
|
Back to top |
|
|
|