Jump to content

mailalerts do not send messages from Contact form.


Recommended Posts

I have a strange problem with mailalert module. I am getting notification about new order, but messages from contact form are not sending. Messages from contact form appears in Admin Panel but i do not get a e-mail notification!

 

My PrestaShop version is 1.5.6. (updated from 1.5.2)

Mailalert module v 2.5.

I have 1 language in my  store and i have proper files in /mails/ and /translations/

 

After trying to send mail:

i have an information that mail was send correctly, but no mail arrives to my email.

 

I have been trying to repair it by:

1. using file "Mail.php" suggested in other forum topic.

2. updating Mailalert (un-instaling and re-instaling)

3. Using whole new module (2.8) from newest version (only switching module/mailalert catalog)

 

I was trying to figure it out by my self checking Mail.php and i found 1 thing:

1. Filling form and submiting.

2. Mail.php show that $swift->send returns 0.

3. Page with contact form shows that message was sent.

4. Refreshing page (F5)

5. Mail.php show that $swift->send returns 1 and message is arrives to my email.

 

What shoud i check ? Where is the problem ?! Please help :(

 

 

Link to comment
Share on other sites

I would think that the email is being sent (contact form) refreshing and getting 1 from mail doesn't hold up much given the 0 on the initial send.

 

I would look on my mail server to see if queued (are you using your url email account?)  also make sure to look in your spam folder as I at times find my contact emails go there on outlook.

Link to comment
Share on other sites

I have to say that i was wrong in the first please about mailalert module and it cause another mistake in my thinking.

What is still true: mail is not sending to admin after first submit of form

but! after refresing "success send page" (F5) the mail is sent only to message author (on the mail that is in form) but admin still do not get it!

 

 

 

I have checked mail server, and i did not find any problems there. The admin mail is a domain mail so it use shop url.

 

 

Schema of what is happening:

post-714865-0-69740100-1385902243_thumb.png

 

Question: what is the name of mail template that shoud be send to admin after contact form submit? (maybe while updating presta i have removed accidentally template of mail to admin?) + where should be the folder with mails templates?

post-714865-0-69740100-1385902243_thumb.png

Edited by mr_shop (see edit history)
Link to comment
Share on other sites

since contact 'out of the box' works, and you have upgraded, try to determine if you have all the files  updated.

 

back office-->advanced parms-->configuration information

 

scroll down...there will be a list of files that differ from your shop and ps release.

 

here you may find something interesting that is different, then take some appropriate action....

 

also, for testing, and if you have file/mem/apc cache turn on, turn it off and retest...

 

also, there have been posts about swift in ps not being up to date, and some advice on how to upgrade swift, which is outside the scope of my knowledge but some have done this.  I think bellini13 knows much about this area.

Link to comment
Share on other sites

  • 5 months later...
  • 4 weeks later...

Same here... working on 1.6.0.5... Front end says it is sent... client get an email as "successfully sent"... but shop side doesnt get any email. It get registered on the back office though... but I need that email too.  I tried using as "Customer Service" recipient several emails addresses, on my own domain or generic as Gmail... not luck. So it seems that PS isnt sending at all...

Any solution?

Link to comment
Share on other sites

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

Thanx "Sergey Shamber"... works for me!!  PS 1.6.0.5... The only problem now is that it doesn´t send the "order ID" parameter, no problem with other fields or attachements... just the order ID is lost on the sending process. Can´t see why...

Thanx again anyways for sharing this fix!!

  • Like 1
Link to comment
Share on other sites

You are welcome:)

"The only problem now is that it doesn´t send the "order ID" parameter" - in Admin Pannel or in mail? 

I see there are no parameters {id_order} in my PS mail templates. Please try to add {id_order} in:

1. contact.html and contact.txt (mail template to admin)

and/or

2. contact_form.html and contact_form.txt (mail template to customer)

Link to comment
Share on other sites

Hi Sergey... I thought of that, but it doesnt work... actually the variable on those files is called "{order_name}" for whatever reason, (since their is not input field on that form called by that name)... My problem is that I dont get that input info that I ask to the user for." Reference of the order"
Anyways... I did that and doesnt even recognize the variable and send it as "{id_order}".

 

Thanx dude

 

 

EDITED:  Sorted... I just went to the ContacController.php, and  add this '{id_order}' => Tools::getValue('id_order'), inside this piece, around line 160 :

$var_list = array(
	'{order_name}' => '-',
	'{id_order}' => Tools::getValue('id_order'),
	'{attached_file}' => '-',
	'{message}' => Tools::nl2br(stripslashes($message)),
	'{email}' =>  $from,
	'{product_name}' => '',
	);

using the "override" folder of course...
So now I can call "{id_order}" value from the contact.html template and contact.txt

Good luck to you all!!
 

Edited by TinoCas (see edit history)
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...