Jump to content

mail function errors


Recommended Posts

I'm having trouble getting the mail function working on a smartyhost account. I have got a number of prestashops working with mosso but this smartyhost is not our usual provider and it is giving me errors for both methods of email setup.

The error on the contact page is:

There is 1 error :
an error occurred while sending message



I tried the Use PHP mail() function
and I get the above error.

I have tried an external smtp server of my ISP using smtp authentication on port 25, that fails, same error.

I asked smartyhost support about what email features are available:
Hi, yes the mail function for php is enabled, or you can use smtp server 'localhost' as long as you authenticate outgoing mail with your username and password.

they also said

So that you don't have unnecessary delays in the mail send out on the smartyhost servers using smtp-auth
ie select mail.YOURDOMAIN as your outgoing mail server and then if you use "Outlook" select the option my server requires authentication and to "use same settings as incoming". If you still have problems then try changing the outgoing port from 25 to port 587 as some ISP's block this in a half hearted attempt at spam control.

same error

i tried to external email server with ssl and that doesnt work...

im at a loss, i have run out of ideas.

Link to comment
Share on other sites

Have you tried writing a script to see if the function exists in php and if it will send an email (seperatly from prestashop)?
You say you tried using an smtp-server, did you set the settings in the php.ini file itself or have you made changes through php?

Link to comment
Share on other sites

  • 3 weeks later...

i tried using a simple php mail script

<?php
$to = "[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "[email protected]";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>



which worked fine, mail arrived shortly after sending.

So i know that the php mail function on the hosting works. but why not for prestashop?

I really do want to get this sorted out, I'd be happy to pay for some technical support if i had a guaranteed resolution.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...
  • 1 month later...

Hi everybody,

I had the same problems...

Il y a 1 erreur :
1. une erreur s'est produite pendant l'envoi du message


Ok, it is in French, but it is an error anyway ! (which says : There is 1 error : an error occurred while sending message too, of course ).

I install PS on a great hostmonster hosting service (where I have several websites I developped... So the mail() fonction just works fine)...

- First, the test email did not work (during installation) ... I thought : ok, let's check it later...

- Second, the error occurs when I tried to send a message using the contact form (no matter how I configure the emails preferences in the admin panel, smtp, mail(), SSL, no SSL, password, no password, localhost, heavenhost, well... The problem is not here).

- Then I registered (a fake account in PS) and then ... Waoooo the contact form was working : no error !

I said to myself (like gollum to the ring or the ring to frodon) : ok... I guess this is the field FROM from the mail() function who is THE problem (well the way it is develop in PS).. So i used the -f option in the php.ini sendmail thing... Didn't work either...

So the problem is : Why can I use the contact form when I am a register client and why this same form doesn't work when I am a no register client (even when I fill the email field of course... You are obliged to fill it anyway)...

Some hostings don't allow to use mail() without a from header... Mine is ok with a simple mail('[email protected]','Subject','Message')...

Without being able to send emails, PS is useless... And the PS code is so.... so... professional that I can't understand a single word of it... Thanks G... it is open-source... But what a source ! It looks like it is still compiled !!

Buuuutt I am searching.... Because PS is necessary, it is the clue of our Internet Business.
Link to comment
Share on other sites

I'm trying to make mailing functionality work via SMTP for 2 days already. It looks like it's not a hosting problem. I've tried both hosting settings and gmail as well.

On this forum there were posts to try to fix 360 line in tools/swift/swift/connection/smtp.php
But that didn't help.

That's really disappointing, since I've thought I was ready to use PS as our new store script.

In efforts to make things work I'm digging code. But I have to agree with zeuf - code is pretty tough.
Could any of developers tell which Authenticator is actually used to connect to authorize on smtp by default (no SSL)?

Also it will be great if there was some kind functionality to test email setting after the installation. And most important, I think there should be a bunch of different error messages for that. So it will be more clear what's wrong.

I will be grateful if somebody could assist in getting smtp working as expected - there are so many posts about this issue on this forum.

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...