lazy123 Posted May 21, 2017 Posted May 21, 2017 Hello guys. I'm new here.I've a problem with my website. Before owner can receive the order from user, user should confirm their order.So I sent a e-mail to user for their confirmation. But when I sent, it seems like a problem.The subject isn't correct at all.Form section isn't from no-reply@starharvest.tk.It should be no-reply, maybe anyone can help me? I've attached the e-mail and my code. Is that any problem of my code? Thank you. Nb : Sorry for my English and code, I'm from Indonesia.
Krydos Posted May 21, 2017 Posted May 21, 2017 You're not setting your headers properly. Just change this one line and it should work.$from = "From: no-reply@starharvest.tk"; The reason is the fourth argument to mail() isn't FROM, but rather HEADERS so you can even put multiple lines of headers including from. Just separate them with /r/n.
lazy123 Posted May 21, 2017 Author Posted May 21, 2017 You're not setting your headers properly. Just change this one line and it should work.$from = "From: no-reply@starharvest.tk"; The reason is the fourth argument to mail() isn't from, but rather headers so you can even put multiple lines of headers. Just separate them with /r/n.OK, I will try it later.And also for subject it appears correctly. I will update again if all correct. Thank you.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now