-
url too long
Hi gang, as usual, here I am again hoping for help for this problem that I can't seem to solve.
I made a page for our agents in my company (we are a help-desk for a canadian ISP) where the agents have to fill out a form which then gets submitted into a ticket for us suckers in tier 2 to resolve. For this one form, the user fills out the customer's info and when they submit the form, it processes all the text required that needs to get pasted into a ticket.
At the bottom I have formatted a mailto link that includes the customer's email address (this gets passed in via POST as a PHP variable) and a subject and a body of text to be sent in the email to the customer which is roughly 1200 characters long.
This was working on the Windows workstations in our helpdesk up until the weekend, but now it no longer seems to go. Clicking on the mailto link does NOTHING. However, nothing has changed in the code, and clicking on the same mailto link from my laptop (running linux) it still works... it opens the email in Thunderbird ready to be sent.
As usual I accused NOC of monkeying with the network but they denied everything.
For a bit I also suspected that some update somewhere in Windows or for Thunderbird has now classified the uri as too long; I noticed if I cut it in half it starts working again!
Any ideas what it can be?
thanks in advance!
Last edited by infiniphunk; 12-15-2009 at 02:21 AM.
Linux user #367409
-
Sorry I've got no idea why this is happening, but since you're already using PHP why are you dynamically creating a mailto instead of using PHP's mail function?
I've had to setup several forms that do something very simple like the following:
Code:
<?php
$to = "someone@example.com";
$subject = "Test mail";
$message = "Content-Type: text/html; charset=iso-8859-1\r\n";
$message .= "This is created using appends for";
$message .= " each element in your form like so..."
$from = "someonelse@example.com";
$headers = "From: $from";
if(mail($to,$subject,$message,$headers)) {
echo "Mail Sent.";
} else {
echo "nothing send maybe create a mailto or something..."
}
?>
I've have a look around for a different solution for you, but just so you know using a link in that fashion can be a problem because IE has a limit of 2083 characters: http://support.microsoft.com/kb/208427 ....
-
All the workstations we use run on XP but everyone is using Firefox and Thunderbird for browser and mail respectively.
I never even thought of trying the PHP mail function, I'll see how that goes. thanks!
Linux user #367409
-
as far as I can tell your solution also assumes that the server is also a mail server I think; I don't think it works to send email out over the internet, or does it?
Linux user #367409
-
I haven't really had to configure it before, so I'm probably not the best person to answer this. But within the php.ini file you've got the "mail function" setting that'll let you set the SMTP server like so.
Code:
[mail function]
SMTP = smtp.isp.net
sendmail_from = me@isp.net
Alternatively there is the PEAR Mail Package
PEAR's Mail package defines an interface for implementing mailers under the PEAR hierarchy. It also provides supporting functions useful to multiple mailer backends. Currently supported backends include: PHP's native mail() function, sendmail, and SMTP. This package also provides a RFC822 email address list validation utility class.
I know neither of these are what you were asking for originally, but I think they offer a better solution that a mailto especially considering the potential limit on URL size for browsers.
I should have a pretty quite day at work today so I can spend some time on Google later
-
Thanks for the help I certainly appreciate it.
I'm starting to like your solution more for more than just one reason, and besides, I've been putting off learning how to set up sendmail or postfix for too long, time to get this going.
thanks again
Linux user #367409
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|