Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sending mail through mainframe in HTML

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

New User


Joined: 16 Feb 2011
Posts: 5
Location: Pune

PostPosted: Wed Feb 16, 2011 4:37 pm    Post subject: Sending mail through mainframe in HTML
Reply with quote

I tried to send the HTML email using mainframe. Mail is being sent in text format not in HTML.
rather than converting HTML code to particular format its sending it as a text.

Can someone help me out and tell me what needs to be changed in order to get the mail in proper HTML format.

this is my JCL:-
Code:
//SMTP     EXEC PGM=IEBGENER       
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY,DCB=BLKSIZE=80
//SYSUT2   DD SYSOUT=(L,SMTP)
//SYSUT1   DD *
HELO MVSLP0
MAIL FROM: <MY EMAIL ID>
RCPT TO: <MY EMAIL ID>
DATA
DATE: MON, 14 FEB 11 07:35:00 EST
FROM: <MY EMAIL ID>
TO: <MY EMAIL ID>
SUBJECT: SMTP TEST
MIME-VERSION: 1.0
CONTENT-TYP: TEXT/HTML:
<HTML>
<HEAD>
<TITLE>THIS IS TITLE</TITLE>
</HEAD>
<BODY>
THIS IS BODY
</BODY>
</HTML>


any help will be appreciated
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7908
Location: Bellevue, IA

PostPosted: Thu Feb 17, 2011 3:59 am    Post subject:
Reply with quote

What are you seeing in the mail client, and what do you expect to see? I ran a test based on your HTML code and get
Code:
THIS IS BODY
for the email text, exactly as expected.
Back to top
View user's profile Send private message
Ashish Shinde

New User


Joined: 16 Feb 2011
Posts: 5
Location: Pune

PostPosted: Thu Feb 17, 2011 4:25 pm    Post subject:
Reply with quote

I am seeing all HTML statements which i have written in JCL as it is in the mail in text format.

Below is the data in may mail:-

<HTML>
<HEAD>
<TITLE>THIS IS TITLE</TITLE>
</HEAD>
<BODY>
THIS IS BODY
</BODY>
</HTML>

however i want to see only "THIS IS TITLE" in title format and "THIS IS BODY" in the body of mail.

I hope you are getting me. for example if my statement in JCL is
<b> Bold statement</b>
then i should see "Bold statement" in bold but the mail which i receive is having <b> Bold statement</b> as it is.

I want to know what changes i need to change in JCL to achive that or do i need to change some settings in my outlook. I am using Outlook 2007.

Your help will really be appreciated.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7908
Location: Bellevue, IA

PostPosted: Thu Feb 17, 2011 5:20 pm    Post subject:
Reply with quote

1. You will not see THIS IS TITLE in an email -- an email client is not a web browser and does not behave the same way.

2. Your mail client may -- or may not -- allow you to use things like bold in an HTML emaill. Only reading the documentatio will tell you for sure. If not, nothing you can do on the mainframe will cause you to have bold text in the email.

3. The specific SMTP data I used is:
Code:
HELO MAINFRAME.xxxx.COM
MAIL FROM: <MAINFRAME@xxx.COM>
RCPT TO: <ROBERT.SAMPLE@xxx.COM>
DATA
FROM:     MAINFRAME@xxx.COM
TO:       ROBERT.SAMPLE@xxx.COM
DATE:     FEBRUARY 16, 2011
SUBJECT:  TEST HTML
MIME-VERSION: 1.0
CONTENT-TYPE: TEXT/HTML

<HTML>
<HEAD>
<TITLE>THIS IS TITLE</TITLE>
</HEAD>
<BODY>
THIS IS BODY
</BODY>
</HTML>
and only THIS IS BODY showed up in the email.

4. If you're doing things like this, you need to find and read RFC 2821, RFC 2822, RFC 2045, RFC 2046, and RFC2047 completely and thoroughly to understand what can -- and cannot -- be done with SMTP and MIME. In particular, your original post had CONTENT-TYP and either this was a mistake in copying -- shame on you if so -- or a mistake in the original JCL in which case MIME will not recognize the information.
Back to top
View user's profile Send private message
Ashish Shinde

New User


Joined: 16 Feb 2011
Posts: 5
Location: Pune

PostPosted: Thu Feb 17, 2011 5:43 pm    Post subject:
Reply with quote

I am sorry for creating confusion in CONTENT-TYPE.
Actually while posting my query, while removing unwanted spaces E got deleted from there. I apologize.

Actually i came to know that it is possible to send mails with formatting fonts or colours through mainframe.
I came to know it from below link:-

http://www.mainframezone.com/it-management/sending-html-email-from-your-mainframe

I am sure whether it is correct or not but as per the description, they have implemented it in their system.

could you please suggest ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7908
Location: Bellevue, IA

PostPosted: Thu Feb 17, 2011 6:23 pm    Post subject:
Reply with quote

As I said in my earlier post, the SMTP commands I posted worked perfectly well to send an HTML email. Have you tried that exact set of SMTP commands yet?
Back to top
View user's profile Send private message
Ashish Shinde

New User


Joined: 16 Feb 2011
Posts: 5
Location: Pune

PostPosted: Thu Feb 17, 2011 6:36 pm    Post subject:
Reply with quote

Yes i tried those SMTP commands and that is working fine.
I also got mail as THIS IS BODY. Your code is perfectly working !!!

My last doubt is as per you, mail client may not allow to use things like bold or colour in an HTML emaill. I found description on the given link that it is possible and they have implemented it.

Is it possible through any way using mainframe ?

I posted my query on that link but didnt get any reply on that.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7908
Location: Bellevue, IA

PostPosted: Thu Feb 17, 2011 7:29 pm    Post subject:
Reply with quote

The only way to know for sure is to find the documentation for your mail client and read it . If your mail client does not support HTML mail (and while most do, not all do), nothing you can do on the mainframe is going to change that.
Back to top
View user's profile Send private message
Ashish Shinde

New User


Joined: 16 Feb 2011
Posts: 5
Location: Pune

PostPosted: Thu Feb 17, 2011 8:03 pm    Post subject:
Reply with quote

Ok. I will check the documents.

Thanks for all your help. It really helped me !!!
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Feb 17, 2011 8:49 pm    Post subject: Reply to: Sending mail through mainframe in HTML
Reply with quote

anyway sending HTML formatted emails might prevent people from seeing it!
Your organization is not supposed to force anybody to abide to it's standards
the safest thing for general use is to send only plain TEXT!
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
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... capricorn Mainframe Jobs 0 Sun Oct 23, 2016 3:49 pm
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 Interface from Mainframe to Confluenc... hblun CLIST & REXX 4 Tue Sep 20, 2016 5:47 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Admin Openings with CTS enikhilk Mainframe Jobs 0 Tue Sep 13, 2016 10:13 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us