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
 

 

Mail via SMTP with an image?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Mike 1304

New User


Joined: 15 Oct 2011
Posts: 45
Location: Germany

PostPosted: Thu Jan 26, 2017 2:01 pm    Post subject: Mail via SMTP with an image?
Reply with quote

Today we send mails as html text using ICEGENER
//SYSUT2 DD SYSOUT=E,DEST=TCPSMTP.

Now I get a new request to add a company logo to the mail.
So I have to embed a image "logo.png" from a PC.

Is there any way to do this?

Mike
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Thu Jan 26, 2017 7:32 pm    Post subject: Reply to: Mail via SMTP with an image?
Reply with quote

Look at using MIME with SMTP. It is possible to transfer binary data (such as images) using MIME under SMTP; whether or not that image will appear in the email or as an attachment is a different question.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1740
Location: NY,USA

PostPosted: Thu Jan 26, 2017 7:39 pm    Post subject:
Reply with quote

If you know SAS then you have a high possibility to achieve it.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1510
Location: Chennai

PostPosted: Fri Jan 27, 2017 6:15 am    Post subject:
Reply with quote

SMTP mail with embedded logo?? say no more fam..

Code:
HELO WELLS                                                           
MAIL FROM:<WELLS@DOGE.COM>                           
RCPT TO:<WELLS@DOGE.COM>                             
DATA                                                                   
FROM: WELLS@DOGE.COM                                 
TO: WELLS@DOGE.COM                                   
SUBJECT: THIS IS BROUGHT TO YOU BY DOGE                                 
MIME-VERSION: 1.0;                                                     
Content-Type: multipart/mixed; boundary="-------------...SuchCode"     
                                                                       
---------------...SuchCode                                             
Content-Type: multipart/related; boundary="-------------...MuchCompile"
                                                                       
---------------...MuchCompile                                           
Content-Type: text/html;                                               
                                                                       
<html>                                                                 
<body>                                                                 
<p> such code much compile </p>                                         
<p style="margin: 0; padding: 0"><img src="cid:wells.gif" alt="" /></p>
<p> very programs </p>                                                 
</body>                                                                 
</html>                                                                 
                                                                       
---------------...MuchCompile                                           
Content-type: image/gif; name="wells.gif"                               
Content-ID: <wells.gif>                                                 
X-Attachment-Id: wells.gif                                             
Content-Disposition: Embedded; filename="wells.gif"                     
Content-transfer-encoding: base64                                       

............................base64 encoded image here – LRECL 80.
.....................................................
---------------MuchCompile--   
---------------SuchCode--     


Output email is in the attachment.
Back to top
View user's profile Send private message
Mike 1304

New User


Joined: 15 Oct 2011
Posts: 45
Location: Germany

PostPosted: Fri Feb 24, 2017 12:10 pm    Post subject:
Reply with quote

Sorry for the late response caused by holidays..

It works fine!
I did the encoding with:
Code:

//STEP0090 EXEC PGM=USIBAS64                                         
//SYSOUX   DD SYSOUT=*                                               
//ENCODIN  DD DSN=BINARY.TRANSFERED.LOGO.PNG,DISP=SHR                 
//ENCODOUT DD DSN=BASE64.OUTPUT.FB80,DISP=SHR                         
//*         SPACE=(CYL,(2,2),RLSE),DCB=(LRECL=80,RECFM=FBA,DSORG=PS) 
//SYSOUT   DD SYSOUT=*                                               
//SYSUDUMP DD SYSOUT=*                                               
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm
No new posts EMAIL using IEBGENER - SMTP parasmalik20 JCL & VSAM 4 Tue May 23, 2017 12:19 am
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Image Copy of a tablespace that conta... Robin Sulsona DB2 4 Thu Jun 02, 2016 1:47 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
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us