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 » How to send a HTML e-mail using Message Broker.

Post new topic  Reply to topic
 How to send a HTML e-mail using Message Broker. « View previous topic :: View next topic » 
Author Message
SHill3
PostPosted: Fri Mar 07, 2008 9:20 am    Post subject: How to send a HTML e-mail using Message Broker. Reply with quote

Newbie

Joined: 07 Mar 2008
Posts: 3

Hi everybody!!, I'm very confused, I'm trying to send an email in HTML format using Websphere Message Broker, My source file is an ASCII file, it contains information from 3 different clients, I have to split the information and send the corresponding records via email to each client, I've already splited the information with no problems, but when I send it, the email is not correctly formatted.

Somebody can help me?, please give me a hint or a clue.

Thanks for advance.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Mar 07, 2008 9:46 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What does it mean "not correctly formatted"?

What version of Broker? What means of sending email?

What is your code written?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
SHill3
PostPosted: Fri Mar 07, 2008 11:19 am    Post subject: Reply with quote

Newbie

Joined: 07 Mar 2008
Posts: 3

Hi Jefflowrey, Let's see.

I'm using Websphere Message Broker 6.1, My message flow is quite simple: it has a MQInput node, a compute node and an EmailOutput node.

First, the MQInput node recives an ASCII file (CSV) and send the message to the compute node.

Next the compute node recives the message to procees it (currently the message contains records from 3 different clients, so it has to split the information because I have to send via email all the corresponding records to each client).

Then using all the related records from one especific client, I have to put them together inside a message and propagate it to the emailoutput node in order to send them via emial.

I repeat these procedure for each different client using a "While .... do".

At these time, I can read the ASCII file, I can split all the correspondig records from each client, put them together into a message and propagate it to the EmailOutput node, when I open the email I see all the corespondig records (everything seems to be fine...) but I can see the HTML tags mixed with the information, something like this:

Code:
<table>
<td><tr>Date</tr><tr>03-07-2008</tr>
<td><tr>Client</tr><tr>ABC Inc.</tr>
</table>


I don´t want to see that tags as part of the text, I want to see the information as a HTML table.

I've already tried this:

SET OutputLocalEnvironment.Destination.ContentType = 'text/html' ;
SET OutputRoot.Properties.ContentType = 'text/html' ;

but nothing happens.

The ASCII file (CSV) looks like this:

Code:
ABC Inc,03-07-2008,Buy,20,Pencil
ABC Inc,03-07-2008,Pay,10.00
DEF Cia,03-07-2008,Buy,15,Notebook
DEF Cia,03-07-2008,Pay,13.50


following that example I want to divide the information in 2 different emails and format them into an HTML table:

Code:
Client:   ABC Inc.

DATE               Operation                  Detail
03-07-2008      Buy                           20 Pencils
03-07-2008      Pay                           10.00

And so on....

I hope this information will be useful for you, I hope you can help me!!
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Mar 07, 2008 11:22 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What is the content type of the email message you are sending?

What other email headers are you setting?

How is your email client configured to display HTML data?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
SHill3
PostPosted: Fri Mar 07, 2008 1:50 pm    Post subject: Reply with quote

Newbie

Joined: 07 Mar 2008
Posts: 3

about the conten type of the email message, I set this property just using the next code....,

Code:
SET OutputLocalEnvironment.Destination.ContentType = 'text/html' ;
SET OutputRoot.Properties.ContentType = 'text/html' ;


I read the EmailOutput node help and I found that, so that's why I'm using those properties.

About other email headers, I'm setting the next ones.

Code:
SET OutputRoot.EmailOutputHeader.To  =  'an email account' ;
SET OutputRoot.EmailOutputHeader.From = 'the sender account' ;
SET OutputRoot.EmailOutputHeader.Subject  = 'the main topic' ;


And finally, the destinations are Hotmail, yahoo and Gmail accounts, I think it is no necesary to configure them, isn't it?

Thanks!!
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Mar 07, 2008 1:57 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Sorry, I didn't see the content type in your first message.

Yes, one would hope that an HTML based email client would display HTML email as HTML by default.

Is the entirety of your email body an HTML document? Or do you just have some HTML markup inside an otherwise text document?

Does the received email show up as text/html? Or something else?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
gregop
PostPosted: Sat Mar 08, 2008 7:53 am    Post subject: Reply with quote

Voyager

Joined: 24 Nov 2006
Posts: 81

Quote:
SET OutputLocalEnvironment.Destination.ContentType = 'text/html' ;


If using local environment for Content type you should be setting it like this:

OutputLocalEnvironment.Destination.Email.BodyContentType = 'text/html'

You could just set it on the EMail node.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to send a HTML e-mail using Message Broker.
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.