-
☆ A M B ☆
- 24,524 Posts
probably an issue with "mod_security" on your web server. They usually don’t like anything in the POST that looks like email stuff, and of course this snippet will be full of email stuff. (usually "cc" and "bcc" causes the problems)
Strange
In agreement with susan, try to save the snippet after having removed these lines :
$entetedate = date("D, j M Y H:i:s -0600");
$entetemail = "From: $email_exp \n";
$entetemail .= "Cc: ";
$entetemail .= " \n";
$entetemail .= "Bcc: \n";
$entetemail .= "Reply-To: $email_exp \n";
$entetemail .= "X-Mailer: PHP/" . phpversion() . "\n" ;
$entetemail .= "Content-Type: text/html;charset=iso-8859-1"."\n" ;
$entetemail .= "Date: $entetedate";
Thanks for your fix James.
I maide this snippet just to explore MODx capacities and your are right it need to have some additions.
Hi,
thanks for the snippet. It’s working great.
I just have two questions on it:
1. Is it possible to make the url in the email into a link?
2. I’m not using a Pop-Up window for the form. Instead it is openend in the same window.
After the Form is submitted, I redirect the user to a thank you page.
Can I somehow put a link to the previous page (which is the same as the link sent to the friend) on the thank you page?
I have a few websites running with modx and sendtoafriend snippet. Recently, I installed a new one and here the snippet doesn’t send email, actually.
When I hit the submit button, I get the ok message, but no message will be received. Is there a way to debug this? This website is on server, running in safe mode, while the others are not.
I am having problems getting Sentoafriend to work with IE.
First, Addpopuplink generates a script error (only tested in IE 7).
To avoid this, I used a classic window.open script to open the popup. It works normally in Firefox, but in IE (6 or 7), I cannot get the URL of the page to display in the message field.
I changed
$myForm = str_replace("[+message+]", $formtext.$_SERVER[’HTTP_REFERER’], $myForm);
to
$myForm = str_replace("[+message+]", $formtext.str_replace(’http//’,’http://’,$_SERVER[’HTTP_REFERER’]), $myForm);
but it does not help.
Anybody has had the same problem and solved it?
Hi kilroy,
I don’t support any more this snippet ... I’m working on an eForm base version.