View previous topic :: View next topic
|
Author |
Message |
harsh.saxena579
New User
Joined: 11 Dec 2017 Posts: 7 Location: India
|
|
|
|
Hi!
I have written a REXX to generate a report file. Now I want to send an automatic mail to all receivers.
I am using IEBGENER to send mail, but I want report in a particular format, as in default format it is misaligned and not readable.
For test purpose, The parm member of my IEBGENER is as follows:
Code: |
MAIL FROM: xxxxxxxxx@xxxxxx.com
RCPT TO: xxxxxxxxxx@xxxxxxxx.com
DATA
FROM: xxxxxxxxx@xxxxxx.com
TO: xxxxxxxxxx@xxxxxxxx.com
SUBJECT: Test Mail SMTP
MIME-Version: 1.0
Content-type: multipart/mixed;
boundary="simple boundary"
HTML Format text
--simple boundary
Content-type: text/html
<font face="Courier" size="+2" color=blue>
This is Courier font in blue</font>
<br><br>
--simple boundary-- |
When I am running the JCL, I am receiving the mail but the entire body content of parm is received i.e.,
Code: |
MIME-Version: 1.0
Content-type: multipart/mixed;
boundary="simple boundary"
HTML Format text
--simple boundary
Content-type: text/html
<font face="Courier" size="+2" color=blue>
This is Courier font in blue</font>
<br><br>
--simple boundary--
|
The JCL step is as follows:
Code: |
//MAIL1 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=PARM.DATASET.NAME,DISP=SHR
//SYSUT2 DD SYSOUT=E,DEST=(N4,R110) |
Can someone help me, where I am wrong? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Yes, you used color tags instead of code tags. |
|
Back to top |
|
|
harsh.saxena579
New User
Joined: 11 Dec 2017 Posts: 7 Location: India
|
|
|
|
I didn't get you .. Can you please explain Nic? |
|
Back to top |
|
|
harsh.saxena579
New User
Joined: 11 Dec 2017 Posts: 7 Location: India
|
|
|
|
Even if I am sending a single MIME command, then also I am getting the content as mail. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
SMTP with MIME is EXTREMELY sensitive to the format of the message; sometimes just having one character off will cause the message to fail or not be delivered in MIME format. Search this forum for some of my earlier responses; I provided an example of a fully functioning MIME formatted message a few years ago. I suspect at least one of your problems is the lack of blank lines before your message boundaries. |
|
Back to top |
|
|
harsh.saxena579
New User
Joined: 11 Dec 2017 Posts: 7 Location: India
|
|
|
|
Okay Robert,
I will go through the topics to find your post.
But I have tried with many SMTP with MIME examples. None working. Not even a simple one.
Thanks!! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
But I have tried with many SMTP with MIME examples. None working. Not even a simple one. |
This is definitely a sign you are impatient. IIRC, it took me DOZENS of tries before I got SMTP with MIME working on z/OS, even on a simple message. |
|
Back to top |
|
|
harsh.saxena579
New User
Joined: 11 Dec 2017 Posts: 7 Location: India
|
|
|
|
No Sir,
I am actually trying implementing it for a long time. and no one in my organization have idea about.
Neither one could tell whom to contact.
Its just that's why, I am asking |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
You do not have
Code: |
CONTENT-DISPOSITION: ATTACHMENT |
(there is more to this statement required so you'll need to do some research) hence you have not told SMTP that you want an attachment so naturally the data is put in the body of the email. |
|
Back to top |
|
|
harsh.saxena579
New User
Joined: 11 Dec 2017 Posts: 7 Location: India
|
|
|
|
I do not want attachment, All i want is text format and font changed as I have mentioned.
Thanks!! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
In other words, you have no idea about SMTP and what it does or how it works -- you need to find the SMTP RFC and read it. FYI, text formatting and fonts are NOT under the control of the host (sending) system -- the mail client (Outlook, Lotus Domino, or whatever) has control of the format and font of the message. There is NOTHING you can do with SMTP to force any other situation. Furthermore, SMTP uses 7-bit ASCII characters; if you want anything else you must use MIME to encode it. So what you are asking to do is IMPOSSIBLE using the tools you have, so it is no surprise you have not been successful. |
|
Back to top |
|
|
|