View previous topic :: View next topic
|
Author |
Message |
Mike 1304
New User
Joined: 15 Oct 2011 Posts: 46 Location: Germany
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
If you know SAS then you have a high possibility to achieve it. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
Mike 1304
New User
Joined: 15 Oct 2011 Posts: 46 Location: Germany
|
|
|
|
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 |
|
|
|