Skip to content
Advertisement

From which email address will php send in mail() function

I am making an email form but from which email address is the mail sent?

Thanks!

Advertisement

Answer

from whatever email adress you specify as sender:

JavaScript

for headers, you can add:

JavaScript

But help yourself and use PHPMailer along with a well configured, dedicated SMTP-Server to send mails: https://github.com/PHPMailer/PHPMailer

(You’ll run into lot of issues otherwhise)

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement