ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » EmailOutput node - Cant attach an image correctly

Post new topic  Reply to topic Goto page Previous  1, 2, 3
 EmailOutput node - Cant attach an image correctly « View previous topic :: View next topic » 
Author Message
elenzo
PostPosted: Tue Oct 08, 2013 6:55 am    Post subject: Reply with quote

Acolyte

Joined: 22 Aug 2006
Posts: 53

I almost got it!
The problem was in line:
[/code] CREATE FIELD P2."Content-Type" TYPE NameValue VALUE 'application/octet-stream; name='
Code:


The correct value for content-type is "image/jpeg".
Now the attachment come as image on my email!
The only thing missing is that the email shows the images and the html all together and not the image as separate attachments, because de images that i am sending are the client's logo and a separator bar and should be part of the email body, I guess i need to change something else on the MIME message and It would be working just fine
Back to top
View user's profile Send private message
Jain
PostPosted: Sun Mar 08, 2015 7:33 pm    Post subject: Reply with quote

Novice

Joined: 11 Nov 2011
Posts: 21

I'm trying to attach a image in the email. for doing so i'm using file input node to get image from dir and using below code.
I'm getting attachment but its not supported by anny of the image viewer.

CREATE FIELD OutputRoot.MIME TYPE Name;
DECLARE M REFERENCE TO OutputRoot.MIME;



CREATE FIELD M."Content-Type" TYPE NameValue VALUE 'multipart/related; boundary=myBoundary';
CREATE FIELD M."Content-ID" TYPE NameValue VALUE 'new MIME document';

CREATE LASTCHILD OF M TYPE Name NAME 'Parts';
CREATE LASTCHILD OF M.Parts TYPE Name NAME 'Part';

-- First part:
-- Some code

-- Second part:
CREATE FIELD P2."Content-Type" TYPE NameValue VALUE 'image/jpeg; charset=utf-8;';
CREATE FIELD P2."Content-Transfer-Encoding" TYPE NameValue VALUE '64bit';
CREATE LASTCHILD OF P2 TYPE Name NAME 'Data';
CREATE LASTCHILD OF P2.Data DOMAIN('BLOB') PARSE(InputRoot.MQRFH2.usr.Image);
Back to top
View user's profile Send private message Send e-mail
Jain
PostPosted: Sun Mar 08, 2015 8:43 pm    Post subject: Reply with quote

Novice

Joined: 11 Nov 2011
Posts: 21

Jain wrote:

I also tried below code
-- First part:
-- Some code

-- Second part:
CREATE FIELD P2."Content-Type" TYPE NameValue VALUE 'image/jpeg; ';
CREATE FIELD P2."Content-Transfer-Encoding" TYPE NameValue VALUE 'base64';
CREATE LASTCHILD OF P2 TYPE Name NAME 'Data';
CREATE LASTCHILD OF P2.Data DOMAIN('BLOB') PARSE(CAST(InputRoot.MQRFH2.usr.Image AS BLOB CCSID 1208));
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Mon Mar 09, 2015 4:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you thought about not specifying a CCSID in the cast? A JPEG is not text...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Mar 09, 2015 4:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I'm confused.

Is this an entirely new question at the end of a very long thread, with many sections and posts that are irrelevant to the question being asked and significantly older?
Back to top
View user's profile Send private message
Jain
PostPosted: Mon Mar 09, 2015 4:34 am    Post subject: Reply with quote

Novice

Joined: 11 Nov 2011
Posts: 21

fjb_saper wrote:
Have you thought about not specifying a CCSID in the cast? A JPEG is not text...


Can you help me to know CCSID for jpeg image file?
Back to top
View user's profile Send private message Send e-mail
Jain
PostPosted: Mon Mar 09, 2015 4:36 am    Post subject: Reply with quote

Novice

Joined: 11 Nov 2011
Posts: 21

mqjeff wrote:
I'm confused.

Is this an entirely new question at the end of a very long thread, with many sections and posts that are irrelevant to the question being asked and significantly older?

I contained the same thread because the initial user was having similar kind of issue while sending image file in the email.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Mon Mar 09, 2015 7:34 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Jain wrote:
fjb_saper wrote:
Have you thought about not specifying a CCSID in the cast? A JPEG is not text...


Can you help me to know CCSID for jpeg image file?

CCSID stands for Coded Character Set ID.

You can use a CCSID only if the transformation is from a string to a byte array and vice versa.

What you are really looking at is the transformation from a byte array to a 64 bit encoded byte array. This 64 bit encoded can be represented as ascii text.
However I would not want to transform that text to any other CCSID as this might break reconstituting the image.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3 Page 3 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » EmailOutput node - Cant attach an image correctly
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.