Author |
Message
|
duffMan |
Posted: Thu Dec 13, 2012 9:41 am Post subject: emailOutput node with empty body |
|
|
 Voyager
Joined: 03 Jun 2002 Posts: 75
|
Hi,
Wondering if someone has come across a requirement to have an SMTP message send without a message body.
Essentially the message I am trying to produce has attachment, but no body.
i.e. the first MIME part is an attachment
The target system complains about the 7bit encoding which is typical of a body, as it is expecting base64.
If I don't have a body in my message tree i get an exception:
BIP4458E: There was an error when the EmailOutput tried to create an e-mail and send it to the SMTP server. The description of the error is: com.ibm.broker.emailnodes.EmailOutputNode : Message passed to the EmailOutput node has a body folder of EmailOutputHeader and owning parser of EMAILHDR. This is not supported by this node.. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx EmailOutputNode.java: 1944: addMessageTextInformationToEmail(): : |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 13, 2012 9:56 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Construct a MIME message tree.
or construct a body that is '' but not nill. |
|
Back to top |
|
 |
duffMan |
Posted: Thu Dec 13, 2012 10:15 am Post subject: |
|
|
 Voyager
Joined: 03 Jun 2002 Posts: 75
|
tx for the quick response.
I had tried this:
CREATE LASTCHILD OF OutputRoot DOMAIN('BLOB');
which creates this:
(0x01000000:Name):BLOB =
which i think is the desired effect, however the EmailOutput node still constructs a mime part for the body, with no content.
------=_Part_8_949827741.1355419609518
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
------=_Part_8_949827741.1355419609518
....
I have manually created MIME structures before, but that was over HTTP. I was under the assumption the EmailOutput node would do "SMTPishy" things behind the scenes besides build a MIME structure, like connect to the smtp server etc.. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 13, 2012 10:17 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you want to allow the email output node to construct a MIME document for you, you can.
However, that appears to require that it create a Body for you, which you've said you don't want.
The other choice is something that
Code: |
CREATE LASTCHILD OF OutputRoot DOMAIN('MIME'); |
and then goes on from there. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 13, 2012 10:19 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Why are you not using the MIME parser to create your MIME message (with body & attachments at your will)? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
duffMan |
Posted: Thu Dec 13, 2012 10:24 am Post subject: |
|
|
 Voyager
Joined: 03 Jun 2002 Posts: 75
|
I'll give that a shot. I was under the impression, of course with no material evidence to back it up , that the emailOutput node would complain about this.
So what I *think* you are saying is the emailOutput node will respect that a MIME structure has already been created. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 13, 2012 10:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
duffMan wrote: |
I was under the impression, of course with no material evidence to back it up , that the emailOutput node would complain about this. |
Such an impression could have been refuted by the documentation.
duffMan wrote: |
So what I *think* you are saying is the emailOutput node will respect that a MIME structure has already been created. |
It can also be refuted by a few minutes of experimentation. About the time it took to post here.
To paraphrase a wise man, "Do, or do not. There is no think". Try it; then you'll know. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
duffMan |
Posted: Thu Dec 13, 2012 12:59 pm Post subject: |
|
|
 Voyager
Joined: 03 Jun 2002 Posts: 75
|
thanks for the sage advice poobah. Just trying to use the nodes as described in the manual, and examples provided by IBM.
Sometimes excessive experimentation leads to a wormhole of despair..and it was failed experimentation that brought me to mqseries.net.
You provided your technical advice (and mqjeff) and I thank you's for it. I ask the internet a question, I get an answer, and then some.
**************************
To close off this thread, handcrafting the MIME and stuffing down the throat of the EmailOutput node did the trick. No email body, only glorious attachments. Target system slurping up the SMPT message like Sunday dinner.
And on a less tongue-in-cheek note, thanks Vitor and mqjeff, your suggestions and expertise are much appreciated.
j |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Dec 14, 2012 3:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It should be reasonably obvious from the documentation that one can pass the EmailOutput node a MIME tree.
I'm not saying it *is* reasonably obvious. I'm saying it *should* be.
Perhaps you can find the place in the documentation where you think you should have been told this, and hit the button at the bottom of the page that says 'feedback'... |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 14, 2012 4:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
duffMan wrote: |
Just trying to use the nodes as described in the manual, and examples provided by IBM. |
Solid plan.
duffMan wrote: |
Sometimes excessive experimentation leads to a wormhole of despair. |
You're doing it wrong. Nil desperandum.
duffMan wrote: |
To close off this thread, handcrafting the MIME and stuffing down the throat of the EmailOutput node did the trick. |
Hardly stuffing it down the node's throat; it's a valid input.
I echo the comments of my most worthy associate on the documentation. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|