Home
TeamSite
email links in workflows
mogoo
I have a weird problem with the emails being generated off of a workflow... If I select more than 1 file, let's say 7, at least one of the 7 links in the email won't work. The code in the generated email will have a ! inserted somewhere in the path of the href, causing that link to break. I can select those same 7 files, generate a new wf, and if I type a different submit comment, the ! will show up in a different place along the path. So it seems like the script is adding a ! every nth character.
The workflow calls on iwsend_mail.ipl. Has anyone encountered this before, or have any clue what might be causing this?
Thanks,
maureen
Find more posts tagged with
Comments
Migrateduser
Perhaps you could provide a code dump of what the source looks like for your emails that have this strange "!" symbol embedded in them. You might put some debug print statements that write out to a debug file at various spots within iwsend_mail.ipl as well, in order to see at what point the evil "!" symbols are appearing. Also, you don't have to use iwsend_mail.ipl - you can customize your own email pretty easily.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Edited by Smitty77 on 08/12/02 01:49 PM (server time).
mogoo
Dave-
Thanks for the advice. I really didn't want to do anything fancy with this wf, so I figured why re-invent the wheel, I can just use the out of the box iwsend_mail, because that should work, right? My mistake, I forgot, this is TeamSite! I just thought maybe someone knew of a bug in iwsend_mail.
2. I don't know how to put debug print statements within iwsend_mail.ipl... can you give an example?
3. I've included a screen shot of the email list... I circled where the !'s are appearing; the code snippet for the junk6.html link is below. -- the ! appears in 2 places in this link -- getty%2eed!u and WORKAREA/mwa!lby -- (I sent it to a web-based email, so there's extra code in there. But it has been tried on a non-web-based email system, and produces the same result)
---------------------------------------------------------------------------------------------------------------------------------------------------------
<td rowspan="1"> <a target=newwin href="
http://proxy-mail.mailcity.lycos.com/bin/redirector.cgi?class=1&url=http%3a%2f%2fteamsite%2egetty%2eed!u%2fiw%2fwebdesk%2fsce%3fvpath%3d%2fdefault%2fmain%2fGettyPublic%2fWORKAREA%2fmwa!lby%2ftemplatedata%2fBOGUS%2fjunk6%2ehtml&uuid=24846&partner_key=mailcity">templatedata/BOGUS/junk6.html</a></td>
---------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks!
maureen
Migrateduser
Well that is pretty bizarre. I understand that you don't want to take the time to customize anything, but often times, the Interwoven out-of-the-box solution doesn't work for everyone. If you are familiar with perl, you can email me directly and I can show you how to simply add a few lines of code into the script so you can see how it's building your urls, and hopefully figure out at which line of code the "!" characters are being introduced. If you execute the same workflow with the same files a bunch of times, do the "!" characters always appear in the same spots, or is it different every time? If it's different, that could be difficult to debug.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Adam Stoller
There have been bugs in iwsend_mail.ipl - and to the best of my knowledge they've been fixed, and fairly quickly.
What version of TeamSite are you using?
The output you showed does not look like anything that I recognize as coming from iwsend_mail.ipl - perhaps someone already tried to customize the script at your site and accidently broke something?
How about contacting Interwoven Support - they might be able to send you a newer version of the script.
--fish
(Interwoven, Curriculum Development)
mogoo
HELP! I'm still having problems. IW support hasn't gotten back to me, after I've sent them 2 emails. We're using v5.0; Smitty was kind enough to email me the iwsend_mail.ipl that ships with v5.5, but it's still adding those ! characters to the emails.
I've attached a sample of the code it's outputing. It looks like it puts in a random !, then a carriage return to the next line. In this case, it only affected the link for junk6.html, only because the other !s didn't happen to land in the middle of an href. Could it be something perl or our servers are doing?
Thanks for any clues!
maureen
sajiddc
somewhere in your transformation, the url might be getting messed up. Right before you print the link, you can use the perl subsitution function to replace the "!"s here is an example
$url =~ s|\!||g;
I have not tested the above example so not sure whether it will actually work or not.
Let us know how it goes.
mogoo
Great idea sajiddc, but I've tried it. And just for kicks, I tried it again upon your suggestion -- nothing. Could that mean it's something our server is adding? Where would I even look to figure that out?
Thank you all for your suggestions!
maureen
sajiddc
Maureen,
Could be your server ( may be mailserver). One way to find out for sure would be to put a hardcode link in that script and see what it does when it reaches the receipient. Atleast this will narrow down our options. What do you say? Let me know.
Migrateduser
Hi,
Did you actually open a case with support, or just send an e-mail? I'll try to this down for you. In the meantime, here is some information that I received from engineering:
The fact that the problem is "random" suggest to me that this is not an encoding problem at all. The encoding methods should be completely deterministic, whether right or wrong. I would initially suspect that the problem is related to message transmission; potentially due to long lines in the e-mail message or buffering. Here are some tests that you might consider:
1. Try to characterize the "randomness" of the problem. Can you send the same email message twice (invoking iwsend_mail from the command line) and find the problem in different places, or does the location only vary from task to task?
2. Try to decouple the message generation from the message transmission. Save the generated email body to a file and see if the problem exists in the file. If it only appears in the receiving email client, try sending the same message to a different mail server or client.
Hope that helps,
IWOV engineering
wailing
well, did you know that iwsend_mail.ipl actually has a debug() function within it?
Don't think it's in the manuals; I only found this "hidden" feature while reading the .ipl itself.
It's activated by putting this extra var. in your /etc/iw.cfg file:
[iwsend_mail]
debug_output=/var/adm/iwtrace.log
(You can choose your own debug file; just make sure the file exists before activating the cmd.)
If you backup your original iwsend_mail.ipl, you can start peppering the .ipl file with debug statements to find out exactly where your problem lies.
rgds,
Rika
mogoo
I haven't opened a case with support, I've just emailed them. My supervisor is going to contact our IW rep.
I really suspect it's something our email server is adding, because if I send the exact same thing twice, I get the same results. I don't have easy access to the system files, like iw.cfg or the log files. Is there any way that I can output into a file in my workarea the email message iwsend_mail.ipl generates? I'd like to see what's being compiled before it runs through the email server; that way I'll know for sure whether it's TS or the server. How would I go about doing this, considering I can't access the log files easily?
Thanks!
mogoo
OK, we've figured it out! The way iwsend_mail.ipl is written, it sends the email message as one big line of code, which the server was choking on....
All we had to do was put some \n into the code it was writing, and now the !s are finally gone. IW might want to think about revising iwsend_mail.... such a simple solution for a headache of a problem.
Thanks everyone for your help!
maureen