Author |
Message
|
DanielSonFocus |
Posted: Thu Aug 11, 2005 1:24 pm Post subject: Sendmail (ia07) plug-in attachment feature not working. |
|
|
 Apprentice
Joined: 05 Jun 2005 Posts: 35 Location: Louisville, Kentucky
|
Hi,
i've installed the Sendmail plug-in (tooling and lil) and on my workbench and broker respectively. I'm able to send SMTP messages out to an email address but the attachments never come across. I used one of the sample messages provided in the support pac and changed the from and to address to point to my email, but still just the email comes across and no attachment. I saw a previous post on this topic, but i didn't see an answer. Any help would be greatly appreciated. |
|
Back to top |
|
 |
rkford11 |
Posted: Thu Aug 11, 2005 3:27 pm Post subject: Re: Sendmail (ia07) plug-in attachment feature not working. |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
DanielSonFocus wrote: |
Hi,
i've installed the Sendmail plug-in (tooling and lil) and on my workbench and broker respectively. I'm able to send SMTP messages out to an email address but the attachments never come across. I used one of the sample messages provided in the support pac and changed the from and to address to point to my email, but still just the email comes across and no attachment. I saw a previous post on this topic, but i didn't see an answer. Any help would be greatly appreciated. |
Daniel,
what's the environment? |
|
Back to top |
|
 |
DanielSonFocus |
Posted: Thu Aug 11, 2005 4:27 pm Post subject: |
|
|
 Apprentice
Joined: 05 Jun 2005 Posts: 35 Location: Louisville, Kentucky
|
I am on Windows XP in a dev environment and ultimately this will be deployed to AIX. Like i said the flow works and the SendMail plug-in works, it just wont send attachments. Here is the ESQL in my compute node before the SendMail routine.
Message Flow:
InputNode --> ComputeNode --> SendMail
Here's the ESQL:
Code: |
CREATE COMPUTE MODULE SMTPdataTransformation_FormatEmail
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
--I just move the message along when it's in the format below for testing purposes.
--CALL CopyEntireMessage();
-- I was using this initially
SET OutputRoot.XML.Message.From = 'theBroker@wherever';
SET OutputRoot.XML.Message.To = COALESCE(InputRoot.XML.To , 'danielL@widget.com');
SET OutputRoot.XML.Message.Subject = 'From the broker';
SET OutputRoot.XML.Message.Body = 'howdy from the broker';
SET OutputRoot.XML.Message.Encoding7Bit.(XML.Attribute)ContentType = 'text/plain';
SET OutputRoot.XML.Message.Encoding7Bit.(XML.Attribute)Name = 'source.xml';
SET OutputRoot.XML.Message.Encoding7Bit = '<![CDATA[' || CAST(BITSTREAM(InputRoot.XML) AS CHARACTER CCSID 1280) || ']]>';
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
|
Here's the message i'm sending across when i just want to test.
Code: |
<Message>
<From>thebroker@wherever.org</From>
<To>danielL@widget.com</To>
<Subject>An e-mail with a txt attachment sent by WBI MB V5</Subject>
<Body>(See attached file: xWMQ.txt)</Body>
<EncodingBase64 ContentType="application/octet-stream" Name="xWMQ.txt"> <![CDATA[VGhlIFdCSSBCMkIgcGxhdGZvcm06IGh0dHA6Ly9lZGkuc2VydmljZXMuaWJtLmNvbS9tcXNlcmllcy9zcGVjX3NoZWV0cy5zaHRtbA==]]>
</EncodingBase64>
</Message>
|
[/code] |
|
Back to top |
|
 |
DanielSonFocus |
Posted: Fri Aug 12, 2005 5:24 am Post subject: |
|
|
 Apprentice
Joined: 05 Jun 2005 Posts: 35 Location: Louisville, Kentucky
|
Does anyone have any ideas about the above? also i have a requirement to create some custom SMTP headers. I've looked through the IA07 documentation and it doesn't look like custom SMTP headers are supported. Does anyone see any issues with creating an external Java Procedure to handle this? Any issues with how threading works within the broker itself. Static methods called from a single thread should be fine but what happens when two or three threads try to use the same static method that creates object instances. I can provide the source if anyone wants to review it. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 12, 2005 5:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you're going to create a custom Java procedure, you are probably much better off scrapping the SendMail node entirely, and just use JavaMail.
Particularly if you have to create custom headers.
You might choose to write a custom plug-in instead of a custom procedure. I don't know of performance characteristics either way, but a plug-in might perform better, or allow you to cache connections that a procedure might not. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
DanielSonFocus |
Posted: Fri Aug 12, 2005 5:55 am Post subject: |
|
|
 Apprentice
Joined: 05 Jun 2005 Posts: 35 Location: Louisville, Kentucky
|
Jeff,
Thanks for the input... i was looking at creating a custom plug-in instead, i think it makes more sense in this case. And you're right, the JavaMail API has alot of great features, particularly custom headers.
Any clues about the attachment problem im having with SendMail? I gotta beleive im making some bonehead newbie mistake. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 12, 2005 5:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
DanielSonFocus wrote: |
Any clues about the attachment problem im having with SendMail? |
I haven't used this node in three years or more... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
vanvught |
Posted: Sun Nov 06, 2005 5:09 am Post subject: |
|
|
 Apprentice
Joined: 02 Jul 2001 Posts: 35 Location: The Netherlands
|
hi,
Have you enabled MIME on the MIME tab of the plug-in?
Futhermore, the next release will support User Defined Headers as described in rfc882.
Regards, Arjan. |
|
Back to top |
|
 |
|