Jump to content

[SOLVED] Upgraded to 1.5.6 and every email sent malformed recipient address


Recommended Posts

I didn't have any issues before upgrading the store.    But now   i am getting back hundreds of emails daily.      If its auto generated by prestashop  its coming back with mean streak.

 

anyone got a clue on how to fix this. 

Share this post


Link to post
Share on other sites

 

Server information

Server information: Linux #1 SMP Tue Apr 16 15:40:06 EDT 2013 x86_64

Server software version: Apache/2

PHP version: 5.3.27

Memory limit: 128M

Max execution time: 30

 

Database information

MySQL version: 5.5.33

MySQL engine: InnoDB

Tables prefix: ps_

 

 

Mail configuration

Mail method: You are using the PHP mail function.

 

Share this post


Link to post
Share on other sites

 

Información del servidor

Información del servidor: Linux #1 SMP Fri Jul 12 15:02:22 EEST 2013 x86_64

Versión del servidor web: Apache

Versión de PHP: 5.3.26

Límite de memoria: 128M

Tiempo Máximo de ejecución: 30

 

Configuración de la base de datos

Versión de MySQL: 5.1.70-cll

Motor MySQL: MyISAM

Prefijo de las tablas: ps_

 

Configuración la tienda

Versión de PrestaShop: 1.5.6.0

Enlace de su tienda: Deleted

Tema actual: default

 

Configuración de email

Modo de envío de emails: Utiliza la función email() de PHP

 

No problems before upgrading from version 1.5.5

 

Regards.

 

Share this post


Link to post
Share on other sites

Just tried SMTP and that is still generating a mallformed address for me here.

 

Note that sending a test email works correctly, but placing an actual order (tried PayPal & Bank Wire) generates the malformed address error.

  • Like 1

Share this post


Link to post
Share on other sites

I was getting Malformed errors when email came from the Mail Alert Module alerting me of new order.

 

Emails to me about new orders (bank wire, Stripe Payment) - Malformed error

Emails to customers (Order process) - no Problems

Test mail - no Problems

 

Changed to SMTP option now no malformed errors that come from Mail alert Module (Version 2.4)

 

If similar issue maybe check the Mail alert module - reset or version number.

 

I had also just changed Server/Hosting company as well so above may not be related to your issue.

Edited by markaussie (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Indeed I'm also using the Mail Alerts module.

 

Uninstall/Reinstall didn't seem to improve.

Removing the mail address from it's configuration and adding it, also adding a different one, no change for me.

 

 

Btw, I'm only using it's "Receive a notification when an order is placed" option.

Share this post


Link to post
Share on other sites

This temporary solution works for me to get emails out

 

In /classes/Mail.php

Add this line above // Do not crash for this error...

 

            $to_name = '"' . $to_name . '"';

 

 

It's not a proper solution as I believe that bug is somewhere else, but it helps for now...

Edited by Ibiza2 (see edit history)

Share this post


Link to post
Share on other sites

I have some additional info:

 

For my case it looks like orders CREATED after the update to 1.5.6.0 are properly sending status update messages.

 

Orders that already existed don't send messages. I will do further testing, but mentioning this maybe other people have the same issue.

Edited by gcorbesier (see edit history)

Share this post


Link to post
Share on other sites

A message that you sent contained one or more recipient addresses that were

incorrectly constructed:

 

 [email protected] <[email protected]>: malformed address: <[email protected]> may not follow [email protected]

 

This address has been ignored. There were no other addresses in your

message, and so no attempt at delivery was possible.

 

------ This is a copy of your message, including all the headers. ------

 

 

Did you guys get this in your inbox?

 

I have uploaded the fix and hope for the best.

Share this post


Link to post
Share on other sites

Thanks Alot !

that realy helps, im happy :)

 

helping for error: 

Mail failure - malformed recipient address

A message that you sent contained one or more recipient addresses that were incorrectly constructed:

 

thanks

Share this post


Link to post
Share on other sites

Mail alerts moduče not working for me. I have 6 e-mail adresses in mail alerts.

Also the name of the product in cart does not show.

Problems started after upgrading from 1.5.5. to 1.5.6.

 

Server information: Linux #1 SMP Fri May 10 08:43:19 UTC 2013 x86_64

Server software version: Apache/2.2.16 (Debian)

PHP version: 5.3.3-7+squeeze17

Memory limit: 128M

Max execution time: 63

Database information

MySQL version: 5.1.66-0+squeeze1

MySQL engine: MyISAM

Tables prefix: ps_

Store information

PrestaShop version: 1.5.6.0

Shop URL: http://www.mojaljekarna.hr/

Current theme in use: leocame

Mail configuration

Mail method: You are using your own SMTP parameters.

SMTP server: mail.mojaljekarna.hr

SMTP user: Defined

SMTP password: Defined

Encryption: off

Port: 25

 

****

After resseting the mail alerts module, it works.

Still have the problem with showing of the name of the product in the cart.

Edited by abondares (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Updated file, and in customer service seems work fine.

 

 

But after customer placed order got 3 mails

- "New Order"

2 malformed mails (suppose they are for customer - "Payment accepted" and "new order")

 

 

Partitialy fixed.

Share this post


Link to post
Share on other sites

hello this has fixed my issue to.

 

however when sending an email it adds in the title random char

 

example

Your message has been correctly sent #ct17 #tcKoswBzJ4VAv2

 

does anyone have a clue as to why? it seems to be script related?

Share this post


Link to post
Share on other sites

here is part of returned message:

 

-------------------------------------------------------------

A message that you sent contained one or more recipient addresses that were

incorrectly constructed:

 

  =?UTF-8?B?w5DCpMOQwrvDkMK4w5HCgiDDkMKdw5HCg8ORwoDDkMK8w5HCg8ORwoXDkMKw?=\n =?UTF-8?B?w5DCvMOQwrXDkcKCw5DCvsOQwrI=?= <[email protected]>\n

-------------------------------------------------------------

Share this post


Link to post
Share on other sites

  • 2 weeks later...

update :

 

it works now.

 

Great, so what did you do to get it to work, because mine still isn't working either...

 

Installed the new mail module v2.5, replaced Mail.php, customers get their mails properly, but I don't get my copy in my mailbox.

 

When I send a test mail through the backoffice I receive a test mail, so it should work...

Edited by xEpyonx (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

here is part of returned message:

 

-------------------------------------------------------------

A message that you sent contained one or more recipient addresses that were

incorrectly constructed:

 

  =?UTF-8?B?w5DCpMOQwrvDkMK4w5HCgiDDkMKdw5HCg8ORwoDDkMK8w5HCg8ORwoXDkMKw?=\n =?UTF-8?B?w5DCvMOQwrXDkcKCw5DCvsOQwrI=?= <[email protected]>\n

-------------------------------------------------------------

 

I have not tested this scenario, but seems when when customer name is in cyrillic (or maybe other non-latin characters?)  it comes as "incorrectly constructed".

Share this post


Link to post
Share on other sites

Benjamin's solution from post #18 worked for me too. I receive notifications about new orders again.

 

Many thanks!

 

Hey guys, make sure to have a backup (How to Manually Back Up your PrestaShop Database and Files)

 

Then, replace your classes/mail.php with this file attached 

 

 

 

Here is the concerning github fix for reference https://github.com/PrestaShop/PrestaShop/commit/789911184b72a2765a6faf39652506057350a021

 

I already went and uploaded the file in this post so just backup and replace your mail.php and let me know how it works.

 

 

Thanks!

 

 

Before trying this solution I deleted mailalerts folder from server completely, then installed Mail Alerts module version 2.5 from here http://www.prestashop.com/forums/topic/280410-prestashop-156-problem-mail-alerts/?view=findpost&p=1423405 and restored my language folders in mailalerts/mails/, but notifications still were not coming.

Share this post


Link to post
Share on other sites

Can you help me, please?

Just like tuverano.com this fix didn't work for me!

Tuverano, did you work this out?

 

I have copied the file Mail.php in the class directory but it did not work.

 

Mails to customer are ok

Testmail works ok

Order Confirmationmail to owner: still the malformed mail failure

 

Configuration:

Servergegevens

Servergegevens: Linux #1 SMP Wed Aug 28 17:19:38 UTC 2013 x86_64

Server softwareversie: Apache

PHP versie: 5.3.27

Geheugenlimiet: 74M

Maximale uitvoeringstijd: 30

Database informatie

MySQL versie: 5.5.33-31.1-log

MySQL engine: InnoDB

Tabel prefix: ps_

Winkelgegevens

Prestashop versie: 1.5.6.0

Winkel URL: http://www.stickerxpress.nl/shop/

Huidig gebruikte thema: warehouse

E-mail configuratie

Mail methode: U gebruikt de PHP mail() functie.

 

Share this post


Link to post
Share on other sites

Mails to customer are ok

Testmail works ok

Order Confirmationmail to owner: still the malformed mail failure

 

Can you please check if customer's name have some non-latin letters (cyrillic or äüö and similar)?

 

I have the problem when some customers place orders it works fine, but those, who have non-latin letters in customer name have malformed mails.

Share this post


Link to post
Share on other sites

Hi XJR100

Thanks for your reply.

 

No  "non-latin letters (cyrillic or äüö and similar)" in custome name.

 

I am still in testing mode and upgraded to 1.5.6

I used my own name as a test customer with just "normal" letters in it.

Share this post


Link to post
Share on other sites

Hi XJR100

Thanks for your reply.

 

No  "non-latin letters (cyrillic or äüö and similar)" in custome name.

 

I am still in testing mode and upgraded to 1.5.6

I used my own name as a test customer with just "normal" letters in it.

I've updated mail.php file as advised in this topic, PS is 1.5.6, tested with my name (all Latin) and no problems with me, but with some customers it comes as malformed. Noticed that they have non-latin letters in their names.

Share this post


Link to post
Share on other sites

I use google smtp server. It works for me now.

 

* Outgoing Mail (SMTP) Server: smtp.gmail.com

* Use Authentication: Yes

* Use Secure Connection: Yes (SSL)

* Username: Your account GMail

* Password: Your password GMail

* Port: 465

Hello.

 

Where did you get Authentication settings? I have no such settings in 1.5.6(

Advanced Parameters separator_breadcrumb.png E-mail

)...

 

I figure it out in such a way

 

1. Create new mailbox in cPanel on my host

2. Use host's mail settings in Advanced Parameters > E-mail

3. For customers messages are sent from my gmail account.

 

But I have cyrillic names in my shop and in "To:" field in message customer could see

=?UTF-8?B?w5DCkMOQwrrDkcKBw5DCtcOQwr3DkMK+w5DCsiDDkMKQw5DCu8OQwrXDkMK6?= =?UTF-8?B?w5HCgcOQwrXDkMK5IMOQwp3DkMK4w5DCusOQwr7DkMK7w5DCsMOQwrXDkMKy?= =?UTF-8?B?w5DCuMORwoc=?= <[email protected]>

Mail alert about new order still don't work(module is up to date).

It is not good point. Any ideas how could solve it?

Edited by fresh_fx59 (see edit history)

Share this post


Link to post
Share on other sites

I use google smtp server. It works for me now.

 

* Outgoing Mail (SMTP) Server: smtp.gmail.com

* Use Authentication: Yes

* Use Secure Connection: Yes (SSL)

* Username: Your account GMail

* Password: Your password GMail

* Port: 465

 

I tried the smtp from google but this also did not work.

I also tried the smtp from my own server. This works just like the php(mail) function.

I still get no order confirmation mail to the shop-owner.

 

I went back to a backup version 1.5.4.1 where everything works fine and wait until there is a new version were this is solved.

Thank you for your response.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

hello this has fixed my issue to.

 

however when sending an email it adds in the title random char

 

example

Your message has been correctly sent #ct17 #tcKoswBzJ4VAv2

 

does anyone have a clue as to why? it seems to be script related?

Did anyone ever find a fix for this as I have the same issue?

Share this post


Link to post
Share on other sites

Hey guys, make sure to have a backup (How to Manually Back Up your PrestaShop Database and Files)

 

Then, replace your classes/mail.php with this file attached 

 

 

 

Here is the concerning github fix for reference https://github.com/PrestaShop/PrestaShop/commit/789911184b72a2765a6faf39652506057350a021

 

I already went and uploaded the file in this post so just backup and replace your mail.php and let me know how it works.

 

 

Thanks!

 

 

 

It's work!

Share this post


Link to post
Share on other sites

Anop, are you still on 1.6.0 or already on 1.6.1. I am asking cause I am planning to install the latest 1.6.1 and it could be that this has already been fixed. Anyhow, it would be more than as a matter of course that Mr. Benjamin would have informed us I suppose.

Share this post


Link to post
Share on other sites

Hi everybody,

 

Well I have the same problem as some around here : updated my version of Mail Alerts module to 2.5, changed the Mail.php file in classes/ with the new one, disabled the module, reinitialized it, changed the email, saved, changed it back again, and I still can't get any mail when there's an order placed!!!

 

This is pretty annoying! Can anyone help me out with this? I do not wish to change from PHP mail to SMTP mail.

 

Many thanks in advance.

Share this post


Link to post
Share on other sites

Hey guys, make sure to have a backup (How to Manually Back Up your PrestaShop Database and Files)

 

Then, replace your classes/mail.php with this file attached 

 

 

 

Here is the concerning github fix for reference https://github.com/PrestaShop/PrestaShop/commit/789911184b72a2765a6faf39652506057350a021

 

I already went and uploaded the file in this post so just backup and replace your mail.php and let me know how it works.

 

 

Thanks!

 

 

 

This fixed worked for me too! Thanks a million Benj!

Share this post


Link to post
Share on other sites

  • 5 weeks later...

Prestashop ver 1.5.6.1 , i replaced not working!

 

is it any thing i have to check on server ?

 

after i removed your mail.php and again upload original mail.php got this error

Notice: Undefined index: MailCore in /var/www/classes/Autoload.php on line 115 Warning: require(/var/www): failed to open stream: No such file or directory in /var/www/classes/Autoload.php on line 115 Fatal error: require(): Failed opening required '/var/www/' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/classes/Autoload.php on line 115

Edited by shahriar (see edit history)

Share this post


Link to post
Share on other sites

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

Hi, same issue here, started from a brand new 1.5.6.0. Every mail works except the ones directed to the shop merchant when someone use the contact page, and the ones sent from mailalert module (I've tested only the restock one directed to the customer, don't use the other ones) that fails with the malformed address error.

 

The point is that I cannot risk to have any kind of malfunction about mails on my production site, so I need to test the fixed mail.php class locally.

I'm a bit stucked here cause I can't reproduce on my test system this problem that I have only on the live site which is configured with the php mail function, while the test one uses smpt. I thought that installing sendmail and switch the config on my test site would result showing the same error, and so I could test the fixed mail.php class on my test environement before upload it on my production site. But even using mail() function with sendmail, from my local snapshot every mail works as a charm with the original mail.php class.

 

Can you guys could help me understand why? :)

for what I see, the only relevant thing that changes between the two Mail.php files is that with the original class, the $to_name variable (at least before the "try{} catch()") contains the mail address, while with the fixed class, the $to_name var is empty (or null) and I don't get what's the point, I don't even understood in which way the address is malformed cause from the error mail, it seems ok.

 

Anyone could be so kind to explain to me a lil better? thanks in advance.

 

 

Share this post


Link to post
Share on other sites

I used method by KORIN, and Email Alert work!

 

1. Replace Mail.php

2. Reset Module Mail Alert

3. Set Off Module Mail Alert

4. Set On Module Mail Alert

5. Edit email, save

 

Work!

 

My Prestashop ver. 1.5.6.2,

Mail Alert Module 3.2

SMTP via Yandex.ru

Share this post


Link to post
Share on other sites

  • 1 month later...

I used method by KORIN, and Email Alert work!

 

1. Replace Mail.php

2. Reset Module Mail Alert

3. Set Off Module Mail Alert

4. Set On Module Mail Alert

5. Edit email, save

 

Work!

 

My Prestashop ver. 1.5.6.2,

Mail Alert Module 3.2

SMTP via Yandex.ru

 

Me too, same problem with no New Order notification emails (customer notifications were all ok). Did the above and now everything working fine again. Yes!

 

Prestashop: 1.5.6.1

Mail Alert ver:  3.2.4

PHP mail

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Great, so what did you do to get it to work, because mine still isn't working either...

 

Installed the new mail module v2.5, replaced Mail.php, customers get their mails properly, but I don't get my copy in my mailbox.

 

When I send a test mail through the backoffice I receive a test mail, so it should work...

 

 

 

Same problem and for me in 1.5.3.1 after update the module in 3.2.4 with  No New Order notification emails 

Edited by hairmania (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 2 years later...
  • 2 months later...
  • 1 month later...
  • 3 months later...