Jump to content

Send to Friend and Contact Us Forms not working (Warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/1


Recommended Posts

I've been searching for this answer on the forum for a while and there are many posts about this issue but no solution (for my issue).

The errors I get:

[1] When I try to send from the contact us form it says it sent, but no email is sent

[2] When I use the send to a friend form I get the error Warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/14/7358314/html/tools/swift/Swift/Plugin/MailSend.php on line 160

I'm using Godaddy as a host and PrestaShop v.1.3.6 by the way...

I started trouble shooting and found out it has to do with the $subject parameter in the MailSend.php file. When I added the line $subject="bla bla bla"; just before line 160 a mail went off with no problem. I even used the same subject I got from echo $subject;

I'm going to keep hacking at it until I find solution then I'll post an update

  • Like 1
Link to comment
Share on other sites

I have godaddy as a host as well and I just sent a support ticket a few days ago this is what they said:

"This error is due to a scripting issue in the contact-form.php file. It appears you have the 'email' field on your form set up to the actual email which the form is sent from. In this case, we will only allow emails from our servers to send these forms. Instead of having that 'email' field on your form try to utilize the email entered to send from, you want to simply make this an informational field, and have the email always send from your (or another GoDaddy) email. This can be done on the hosting end by editing the form mailer file. "

Instead of trying to figure it out because I cannot really troubleshoot PHP, I ended up replacing the contact form and mailer with my own that I got off the internet - seems to work fine.

I am having an error with the Send to Friend mod and I suspect it is the same reason.

Link to comment
Share on other sites

FYI, The article at http://www.presto-changeo.com/content/9-fix-email-problems is the fix for Godaddy not sending emails at all. Just apply that fix and the the contact form will work. This however doesn't fix the "subject" issue for the send to friend form.

Since the contact form uses a "hard coded" static subject I think that's why it works. I think somehow the way the product or the recipient name is added to the subject line for send to friend is causing the issue.

Link to comment
Share on other sites

I decided to just replace the script entirely. I don't have the knowledge to write and troubleshoot PHP but I have a script I like and I know how to insert it. The form actually sends me an email when someone uses the friend form and it sends me a link so I know what page/product they sent to a friend. It allows for 3 friend's emails too. Far better than the Presta Friend form.

The only thing is I don't know how to code it as a mod so I made it a permanent link above the "print" link when you view a product. I should have done this months ago. Works like a charm.

Link to comment
Share on other sites

I have it posted on a webpage on one of my sites: http://www.debsdigitaldesigns.com/free-tell-a-friend-script.html
Have at it, I love it!!!!

After i installed the above code, I manipulated the product.tpl page and inserted the new link and code just above

{l s='Print'}



New code to insert:
See text doc "New link.txt" (I was not able to post it here for some reason)

the above code makes it open as a new screen over the website instead of making the user navigate away from the product to a thank you page. This all works right over what ever product they are viewing and they can remain on that page and never leave after they send it to a friend.

(Obviously change my URL to your path where ever you put in, I put in inside the send a friend mod - might not be the best place but it's what I did) Then all i did was disable the presta shop send a friend which removed the duplicate "Send to friend" link on the product.php page

You can see it work on my site: www.auntdebbiescountrystore.com - you can even use the little thank you png image I made - I attached it.

38678_m2G3NZLWSoFHlCrRXQEt_t

New link.txt

Link to comment
Share on other sites

  • 7 months later...

In order to be able to send email through our Godaddy hosting accounts you must use the following relay server in your code:

relay-hosting.secureserver.net

You do not need to provide a user name and password for this relay server as it does not require authentication. You can use port 25 if the application requires a port.

  • Like 1
Link to comment
Share on other sites

  • 6 months later...

 

In order to be able to send email through our Godaddy hosting accounts you must use the following relay server in your code:

 

relay-hosting.secureserver.net

 

You do not need to provide a user name and password for this relay server as it does not requireo authentication. You can use port 25 if the application requires a port.

 

YOU ROCKS Booker!!!

 

After years and ages for trying everithing on the forum, your simple solution, hit the target!

 

THANKS!!! Sooooo much!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...