Re: Tell A Friend Script
What do you mean "then went to tellafriend.php location " ? the script should only be accessed by the form, not directly. Please post here the URL of the tell a friend page so i can have a look.
Tell A Friend Script
Collapse
This topic is closed.
X
This is a sticky topic.
X
X
-
Re: Tell A Friend Script
Hello
Sorry I am back again, I have uploaded the files in there own directory,
and I have changed lines
18 $mail->Username = "USERNAME"; // SMTP username
19 $mail->Password = "PASSWORD"; // SMTP password
22 $mail->FromName = "DOMAIN.com";// The From name you want to appear in the email
Saved this then went to tellafriend.php location
And I get
Message was not sent
Mailer Error: Language string failed to load: recipients_failed
Want have I not done? Can you please advise
Many thanks Wayne
Leave a comment:
-
-
Re: Tell A Friend Script
I have absolutely NO idea what happened, but it's decided to work, with no help from me. lol Thanks anyway!
Leave a comment:
-
-
Re: Tell A Friend Script
Hiya Naval,
I *think* I've followed your instructions correctly, but have ended up with a problem when I click the "Tell a friend" button. I got the following error:
Message was not sent
Mailer Error: Language string failed to load: data_not_accepted
I used my CPanel login information... should I have used my email password instead of the one I use for the CPanel?
The addy is: http://www.ccabincandles.com/tell_a_friend1.html
Apparently I've missed a step somewhere, or messed up something you've set up... have any ideas?
Thanks in advance. :)
Leave a comment:
-
-
Re: Tell A Friend Script
It can be done easily: delete the additional fields from the TAF form. Just make sure that if you change the layout, all the fields and buttons are still in the form area. You can rearrange the fields, change colors, make them smaller, whatever you want.
Please also note that this TAF script has been posted when VH pollicy about email required SMTP authentication to send emails to an external (non VH) email address. Now it is not any more required, as this pollicy has changed, so you could simply create your own script, more or less like a form mailing script as described in the forms tutorials.
Leave a comment:
-
-
Re: Tell A Friend Script
Hello Navaldesign
I saw you script and it works great, now I think I am going to be a pain and ask the following, but still is going to be go for other users to.
Is there any change you can mod the exsisting code so it's either
Tell a Friend [FRIENDS NAME] @ [EMAIL] (SEND)
OR
Tell a Friend [EMAIL] (SEND)
With the added bonus of the content of the body of the email.
Because I am thinking of space
And the other question instead of going to another page, can the SEND change to DONE or SENT
Just a thought
Many thanks Wayne
Leave a comment:
-
-
Re: Tell A Friend Script
Please use myform to send me the entire php script, and also send me the .bvp file of the page with the tell a friend script. Or, send me your loggin info (IP, username and password) as well as your email password (the password used for your email account, the one used for sending the mail) and i will fix it for you.
Leave a comment:
-
-
Re: Tell A Friend Script
Hey Naval,
I went back and corrected everything you told me to. The reset button works fine now and also it goes where it needs to go if you just click the submit button...goes to an error page. But when I put in a test info with my email address it still gives this error after I click submit:
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 in /home2/ooiroorl/public_html/class.smtp.php on line 105
Message was not sent
Mailer Error: Language string failed to load: connect_host
Leave a comment:
-
-
Re: Tell A Friend Script
You do not have a script problem, you have a form problem. You have modified the "Tell a friend" button. It is no longer a submitbutton, but it has become a "On click" button, linked directly to the "thanku_tell.html" Page. The info is not evan submitted to the script, when you click on "Tell a friend" you go straight to the Thanktou page.
The same goes for the Reset button: it doesn't reset, you have also made it a "On click" button, with it's action set to refresh the page. It does reset, but because it reloads the page.
Also, both buttons are OUTSIDE the form area, this is why initially they didn't work, then you started touching here and there.
Also change the metatags; Page description, keywords, Author etc: they result to be still mine (as you have downloaded my original script and didn't edit these elements)
Plese follow these steps:
1. open the page in Bv.
2. stretch the form area towards the bottom of the page, enough to have the buttons inside the form.
3. Copy the two buttons.
4. Delete them
5. Paste them using the Paste icon in the top toolbar (this way they will be pasted excactly in the same position).
6. Double click on the Reset button, and edit it: make it "reset" instead of "On click"
7. Do the same with the submit button, make it "Submit" instead of "On click"
Save, Publish and try your form
Leave a comment:
-
-
Re: Tell A Friend Script
Hi Naval,
Here is my script:
<?php
require("class.phpmailer.php");
@$name = addslashes($_POST['name']);
@$friendname = addslashes($_POST['friendname']);
@$email = addslashes($_POST['email']);
@$subject = addslashes($_POST['subject']);
@$message = addslashes($_POST['message']);
@$youremail = addslashes($_POST['youremail']);
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "localhost"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "xxxxxxxx"; // SMTP username
$mail->Password = "jjjjjjjj"; // SMTP password
$mail->From = $youremail; // Your emailin your account
$mail->FromName = "Your Title";// The From name you want to appear in the email
$mail->AddAddress($email); //the receiver's email'
$mail->WordWrap = 50; // set word wrap
$mail->Subject = "$subject $name\n";
$mail->Body = "Hi $friendname\n"
. "$message\n "
. " \n"
. " Bye $name\n";
if(!$mail->Send())
{
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
header("Location: tell_a_friend.html"); // returnpage is the same page of the form or another of your choice.
?>
How do I add the script "Message not sent" ?
Leave a comment:
-
-
Re: Tell A Friend Script
There is no "Message not sent" page, this is a very essential script. Validation can be added however if you wish, with just three addiational lines of code. I tried it too and got no mail, so i suppose there is something wrong that you have done with the script. Please post the php script here, excactly as you have modified and uploaded it.
Leave a comment:
-
-
Re: Tell A Friend Script
Hi Naval,
Just sent you an email. Since I've emailed you I have been doing some tweaking and hoping to get it right. The reset is fine and I've got the submit to go to my thank you page, but I've been testing and not getting the email. Also even when I click submit without putting anything in the fields it goes to my thank you page instead of message not sent. :(
Leave a comment:
-
-
Re: Tell A Friend Script
ALL files should be uploaded in the same folder where your page (the one with the TAF form) is. If snelensimpeleengratiswebsitebouwen.com is your main domain, then the correct folder is your public_html folder, if it is an addon domain, then the correct folder is the default folder of this domain.
It seemes as though none of the three php files are uploaded in the correct folder.
You also have one more problem: you have draged the reset button outside the form area, so it doesn't work.
Leave a comment:
-
Leave a comment: