Email template

Hi. I have a simple form it has one field and a submit button. The field is a email field. When i type a email in this field i want it to send a pre set message to the email entered.

What php code do i use ?

You probably want to look up, sending mail with php

The php send mail works ok if the result is coming to my email. My form has 1 input and a submit button. I want to type an email into thst input and it sends a preset message to that e mail i typed in.

Okay. Does that preset message have variables in it or is it the same for everyone?

file_get_contents will pull in a file in as a template that can be sent as the body.

If it needs to have variables, you can do placeholders {name} and use str_replace with arrays to swap real values with the placeholder.

thank you i have sorted it

Sponsor our Newsletter | Privacy Policy | Terms of Service