Jump to content

[Solved] Copy Of The Message Sent To The User.


johnytapia

Recommended Posts

Hi,

 

I would like to user (not necessarily registered in the store) by sending a contact form from the store to receive copies of submitted form to given in the form email. (variable $ from)

I greet and thank you in advance for your help.

sorry for my english

Presta 1.3.6.0

Link to comment
Share on other sites

Hello!

Try changing this line :

if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $from, '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from)))

 

to this:

if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $from, '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from)) AND Mail::Send(intval($cookie->id_lang), 'contact', 'Copy of your message', array('{email}' => $from, '{message}' => stripslashes($message)), $from, '', $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from)))

Link to comment
Share on other sites

  • 4 weeks later...

Your solution works but my code looks a little different, and form fields are not populated with data.

Can I ask you to adapt the code below according to your rules?

I greet and thank

 

My code:

if ( Mail :: Send ( intval ( $cookie -> id_lang ), 'contact' , 'Formularz kontaktowy' , array( '{email}' => $_POST[ 'from' ] , '{message}' => stripslashes ( $message ),
'{name}' => stripslashes ( $name ), '{lastname}' => stripslashes ( $lastname ), '{address}' => stripslashes ( $address ), '{city}' => stripslashes ( $city ),
'{postalcode}' => stripslashes ( $postalcode ), '{telephone}' => $_POST[ 'telephone' ] ), $contact -> email ))

Link to comment
Share on other sites

Many thanks to CartExpert.net for solution.

if someone needed:

 

 

if (Mail::Send(intval($cookie->id_lang), 'contact', 'Formularz kontaktowy', array('{email}' => $_POST[ 'from' ] , '{message}' => stripslashes ( $message ),
'{name}' => stripslashes ( $name ), '{lastname}' => stripslashes ( $lastname ), '{address}' => stripslashes ( $address ), '{city}' => stripslashes ( $city ),
'{postalcode}' => stripslashes ( $postalcode ), '{telephone}' => $_POST[ 'telephone' ] ),
$contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $email))
AND Mail::Send(intval($cookie->id_lang), 'contact', 'Kopia formularza kontaktowego', array('{email}' => $_POST[ 'from' ] , '{message}' => stripslashes ( $message ),
'{name}' => stripslashes ( $name ), '{lastname}' => stripslashes ( $lastname ), '{address}' => stripslashes ( $address ), '{city}' => stripslashes ( $city ),
'{postalcode}' => stripslashes ( $postalcode ), '{telephone}' => $_POST[ 'telephone' ] ),
$from, '', $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $email)))

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