Tags:
create new tag
view all tags

Question

I am creating a form and combining elements from the FormPlugin and the SendEmail Plugin. When I send a form that has more than about 80 characters of comments, the message times out. Sometimes it dumps me back to the form, and sometimes I get a generic "Cannot view webpage" error. In the apache logs, sometimes I get nothing, and sometimes I get:

sendmail: femail_put: line length exceeded 
[Mon Oct 20 11:48:04 2008] [error] [client ###.###.###.###] malformed header from script. Bad header=or.pm%20line%20379%0A%09eval%2: /htdocs/bin/sendemail.pl 

Please advise. Thanks in advance.

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: LINUX
Web server: Apache
Perl version:  
Client OS: Windows Vista
Web Browser: IE 7
Categories: Plugins

-- JamieBenjamin - 20 Oct 2008

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

From IRC: See here and here.

-- OliverKrueger - 20 Oct 2008

Update: I set the plugin DEBUG = 1 and received the following output:

| 22 Oct 2008 - 18:46:02 | errorStatus=1
| 22 Oct 2008 - 18:46:02 | _finishSendEmail errorStatus=1;
| 22 Oct 2008 - 18:46:04 | _handleSendEmailTag; errorStatus=1

Here is the code for the form:

---++Customer Feedback Survey
<script type="text/javascript">
function refresh_form() {
onLoad="{document.mailForm.reset();"
}
</script>
%STARTFORM{
name="mailForm"
action="%SCRIPTURL{sendemail}%/%WEB%/%TOPIC%"
method="POST"
enctype="application/x-www-form-urlencoded"
}%
%FORMELEMENT{
name="To"
type="hidden"
title="To:"
default="me@mmyemail.com"
}%
%FORMELEMENT{
name="Subject"
type="hidden"
default="%INCLUDINGTOPIC% Feedback Survey"
}%
*Please complete the following sentences with the response that most accurately reflects your experience:*
%FORMELEMENT{
name="Screenshots"
type="radio"
title="The screenshots and graphics were __________."
options="1=Very Helpful, 2=Somewhat Helpful, 3=Not Helpful"
validate="nonempty"
mandatory="on"
fieldformat="$e <br />"
hint="Please select one response."
}%
%FORMELEMENT{
name="Explanations"
type="radio"
title="The explanations were __________."
options="1=Very Helpful, 2=Somewhat Helpful, 3=Not Helpful"
validate="nonempty"
mandatory="on"
fieldformat="$e <br />"
hint="Please select one response."
}%
%FORMELEMENT{
name="Found_It"
type="radio"
title="I __________ find the information I was looking for."
options="1=Did, 2=Did not"
validate="nonempty"
mandatory="on"
fieldformat="$e <br />"
hint="Please select one response."
}%
%FORMELEMENT{
name="Overall"
type="radio"
title="Overall, this manual was __________."
options="1=Very Helpful, 2=Somewhat Helpful, 3=Not Helpful"
validate="nonempty"
mandatory="on"
fieldformat="$e <br />"
hint="Please select one response."
}%
%FORMELEMENT{
name="Comments"
title="Questions or Comments:"
type="textarea"
rows="5"
cols="80"
}%
Please let us know who you are, so we can respond to your comments (optional):
%FORMELEMENT{
name="Name"
type="text"
title="Name (First and Last):"
}%
%FORMELEMENT{
name="Email"
type="text"
title="E-mail Address:"
}%
%FORMELEMENT{
name="Company"
type="text"
title="Company:"
}%
%FORMELEMENT{
name="body"
type="textarea"
rows="20"
cols="80"
cssclass="twikiHidden"
default="Screenshots: $Screenshots
Explanations: $Explanations
Overall: $Overall
Found It: $Found_It
Comments: $Comments
Name: $Name
E-mail: $Email
Company: $Company
Completed By: %WIKINAME%"
}%
%FORMELEMENT{
type="submit"
buttonlabel="Submit Survey"
}%
%ENDFORM%
%SENDEMAIL{feedbackSuccess="Feedback sent. Thank you very much!" feedbackError="Could not send your message, please contact us." }%
%RED%*%ENDCOLOR% These fields are required.
<blockquote>
%MAKETEXT{"If you have any questions about this survey, send an e-mail to [_1]." args="<a href='mailto:%WIKIWEBMASTER%?subject=%TOPIC% Question'>%WIKIWEBMASTER%</a>"}%
</blockquote>

-- JamieBenjamin - 22 Oct 2008

More from the error log:

| 22 Oct 2008 - 20:16:14 | sendEmail start
| 22 Oct 2008 - 20:16:14 | sendEmail query=CGI=HASH(0x80d6527c)
| 22 Oct 2008 - 20:16:14 | sendEmail -- [[mailto:to=wiki@mydomain.com][to=wiki@mydomain.com]]
| 22 Oct 2008 - 20:16:14 | sendEmail -- [[mailto:from=wikiweb@mydomain.com][from=wikiweb@mydomain.com]]
| 22 Oct 2008 - 20:16:14 | sendEmail -- subject=ManualSurvey Feedback Survey
| 22 Oct 2008 - 20:16:14 | sendEmail -- body=Screenshots: 2
Explanations: 3
Overall: 1
Found It: 2
Comments: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
Name: 
E-mail: 
Company: 
Completed By: JamieBenjamin
| 22 Oct 2008 - 20:16:14 | mail message=From: wikiweb@mydomain.net
To: [[mailto:me@myemail.com][me@myemail.com]]
CC: 
Subject: ManualSurvey Feedback Survey
Screenshots: 2
Explanations: 3
Overall: 1
Found It: 2
Comments: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
Name: 
E-mail: 
Company: 
Completed By: JamieBenjamin
| 22 Oct 2008 - 20:16:48 | errorStatus=2
| 22 Oct 2008 - 20:16:48 | _finishSendEmail errorStatus=2;

sendmail: femail_put: line length exceeded 
This seems to be from the MeTA1 mail transport agent, and might in fact be a "bug" in this software, and might have nothing to do with TWiki, the SendEmailPlugin or the FormPlugin.

It might be worth trying out Net::SMTP to send out mails, instead of relying on the sendmail program.

-- OlivierRaginel - 23 Oct 2008

I've tried your code on my TWiki installation and it works just fine, even with very long comments.

  • SendEmailPlugin (1.2.2, $Rev: 17666 (17 okt 2008) $): Allows to send e-mail through an e-mail form
  • FormPlugin (1.2, $Rev: 16490 (08 Mar 2008) $): Lets you create simple and advanced web forms
  • This site is running TWiki version TWiki-4.2.3, Wed, 06 Aug 2008, build 17396, Plugin API version 1.2

-- OlivierRaginel - 24 Oct 2008

We have determined on our end that this problem is caused by a bug in the FormPlugin that is imposing a maximum line length on the message. If someone could correct this bug, we would appreciate it. In the meantime, we will have to find a way to create the forms we need by hand.

-- JamieBenjamin - 03 Nov 2008

Closing this after more than 30 days of inactivity. Please feel free to re-open if needed.

-- PeterThoeny - 02 Jan 2009

Make sure to file a bug report: TWikibug:FormPlugin.

-- PeterThoeny - 02 Jan 2009

Change status to:
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2009-01-02 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.