I want to use PHPMailer configure the contact page for my website. The prroblem I am facing is that for the script to work, the from address has to be set in the local server e.g. if my domain is example.com, the from address has to be name@example.com. When I set it this way, the script works perfectly. the issue I'm having is that being a contact page, the from address has to be the senders email address this there for means that if a customer contacts me with the email address like name@email.com, the script will throw an error similar to the one below:
SMTP ERROR: DATA END command failed:
550-Your FROM address ( name@email.com , Dev Customer 550-)
must match your authenticated email user ( name@example.com ).
Does anyone have any idea on a way to work around this? Or are there any alternatives? I will appreciate any form of assistance offered. Thank you in advance.