Jump to content

Contact form: change 'from' and 'reply-to' fields


Recommended Posts

Hello,

The contact form isn't working well with my server (DreamHost). If a user enters their email address as being [email protected], the mail doesn't go through - and I don't know anything about it. Apparently, this has been the case for a few months now, and is very disappointing to hear that I've been losing customer questions!

The solution would be to insert my email address ([email protected]) into the 'from' field of messages, and have the user's email address appear as the 'reply-to'.

I am not sure how to do this.

The code in my /contact-form.php file is as follows:

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



What do I change?

Thank you for your help!

P.S. The same code, but perhaps in a form that's easier to read:

if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $_POST['from'], '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from)))
$smarty->assign('confirmation', 1);
Link to comment
Share on other sites

  • 2 months later...

Actually, it did work before, but now I tried again - and it no longer sends through messages that were sent from @gmail.com accounts.

This is starting to be very unreliable, as I am given no notice of this - and simply don't receive customer messages.

What should I do?

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