Jump to content

Mail sending error


zeuf

Recommended Posts

Hi Everybody

I just installed PS for a friend... Great toy !! But as a lot of people, sending mail from the contact form did not work... (even during the installation process it did not work).

So I read the forum... I was amazed by the numbers of people who met this problem... And without emails possibilities PS is like a Veyron without oil...

So we can read that you have to do this SMPT, or do that PORT, or SSL this or TLS that... Put a Localhost or don't mention your password... Well... This is not the problem here when you succeeded in sending mail when you are registered (and failed without being logged)... AT ALL !

I searched... And I found something :

The file : /classes/Mail.php
Line 29 (with great Notepad++) :

if (!isset($fromName)) $fromName = $configuration['PS_SHOP_NAME'];



That was my problem... Well I have to admit that I did not look for Why... I just COMMENT this @##@## line after almost 3 hours of "work"... (by the way I think that is the only line of code I can understand).

And I replaced by this beautiful line :

// if (!isset($fromName)) $fromName = $configuration['PS_SHOP_NAME'];
$fromName = 'Client' ;



But you can put what you want :

$fromName = 'FromWebsite' ;
$fromName = 'Contact' ;
...



And it works perfectly !

Apparantly it sets the name of the FROM: field in mail(). And when it is empty (for the installation email test or when you are not registered), it is not working for me.

Cheers !

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

And I replaced by this beautiful line :
// if (!isset($fromName)) $fromName = $configuration['PS_SHOP_NAME'];
$fromName = 'Client' ;




Have you configured in back-office the Tools/ Contact/ Shop name:?

For me it seems that you could have avoided modifying the files with this...
Link to comment
Share on other sites

  • 2 months later...
Hi Everybody

I just installed PS for a friend... Great toy !! But as a lot of people, sending mail from the contact form did not work... (even during the installation process it did not work).

So I read the forum... I was amazed by the numbers of people who met this problem... And without emails possibilities PS is like a Veyron without oil...

So we can read that you have to do this SMPT, or do that PORT, or SSL this or TLS that... Put a Localhost or don't mention your password... Well... This is not the problem here when you succeeded in sending mail when you are registered (and failed without being logged)... AT ALL !

I searched... And I found something :

The file : /classes/Mail.php
Line 29 (with great Notepad++) :
if (!isset($fromName)) $fromName = $configuration['PS_SHOP_NAME'];



That was my problem... Well I have to admit that I did not look for Why... I just COMMENT this @##@## line after almost 3 hours of "work"... (by the way I think that is the only line of code I can understand).

And I replaced by this beautiful line :

// if (!isset($fromName)) $fromName = $configuration['PS_SHOP_NAME'];
$fromName = 'Client' ;



But you can put what you want :

$fromName = 'FromWebsite' ;
$fromName = 'Contact' ;
...



And it works perfectly !

Apparantly it sets the name of the FROM: field in mail(). And when it is empty (for the installation email test or when you are not registered), it is not working for me.

Cheers !




i can send the mail ,but can't receive the message.
Link to comment
Share on other sites

i can send the mail ,but can't receive the message.


That means you can't send the mail. Event if it says "Mail sent" the mail was sent only to the local mail server and it can still fail when this server tries to send it to the destination.
Link to comment
Share on other sites

i can send the mail ,but can't receive the message.


That means you can't send the mail. Event if it says "Mail sent" the mail was sent only to the local mail server and it can still fail when this server tries to send it to the destination.


thank you
but how to fix it ,and where wrong
Link to comment
Share on other sites

a possible part solution

I've found that if I edit the MailSend.php from tools/swift/swift plugin and blank out the header & parameter bits from around line 160 to be:

if (!ini_get("safe_mode")) $success = mail($to, $subject, $message, "", "");
else $success = mail($to, $subject, $message, "");

I can successfully get phpmail to work at shop setup (so assume it'll work at other times as well).

Possibly this means the header info / params passed are creating the problem, or at least with my host (hostmonster).

I don't know enough about php to see why but it seems similar to some posts saying to use params="".

Link to comment
Share on other sites

  • 2 months later...
  • 7 months later...

Sayin Cagrie,

siteleriniz gercekten güzel ve original. Görüyorumki SSL korumali Kredi Karti alisveris metodunu kulaniyorsunuz.
Ama daha cok müsleri ikna etmek ve güven altina almak icin size kendi sitelerinizin üstüne SSL teknolojisini kulanmaniza tavsiye ediyoruz.

Ayriltili bilgi icin lütfen buraya gidiniz: https://www.networking4all.com/en/ssl+certificates/

Hayirli günler,

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