How do I have the reply address be from the person filling out the contact form instead of the site admin's email in the contact us page?
How do I have the reply address be from the person filling out the contact form instead of the site admin's email in the contact us page? |
Seeing as how this is managed by the web site's email account, I don't see how it's possible without the person sharing their email password. Oh, I see, you want to at least have a forged return address, eh? That would take some modifications, maytee. BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
It would be wonderful if the email address submitted on the Contact Us form was used as Reply-to email address for the message sent to the site administrator. In this way, responses to Contact Us messages would go to the person completing the Contact Us form. Is it not possible for the Reply-to address to be set to the email address of the submitted form in the code which constructs & sends messages from the Contact Us page? |
The easy way to do it is replace the Dolphin email function in contact.php with the one built into php. Look for this line:
if (sendMail($site['email'], $sLetterSubject, $sLetterBody)) {
and change it to this:
if (mail($site['email'], $sLetterSubject, $sLetterBody, $sSenderEmail)) { BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
The easy way to do it is replace the Dolphin email function in contact.php with the one built into php. Look for this line:
if (sendMail($site['email'], $sLetterSubject, $sLetterBody)) {
and change it to this:
if (mail($site['email'], $sLetterSubject, $sLetterBody, $sSenderEmail)) { Unfortunately, this didn't work. It simply inserted the name of the sender as the first line in the sent message & changed the sender to: my account name @ my hosts' domain name . com It also stripped out the HTML in original message so it looks like this: blah@blah.com <p>Contact Us message received:</p><strong>Name:</strong> blah<br/><strong>Email Address:</strong> blah@blah.com<br/><strong>Subject:</strong> Test message 5<br/><strong>Message:</strong> Test message after code change |
That's odd, did you cut and paste the exact line from my forum post?
Here's the contact.php I use, I've changed a few things... back yours up first and give mine a try. It's working on my sites and it even gives you the senders IP address :-)
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Exactly the same, yes. Does it work on your site? Are you running Dolphin 7.0.7? Dolphin's sendMail function is obviously working differently. Maybe we can compare them between our installations? |
Yes it's working on all my sites, I pulled that file from one that is ver 7.0.7. I have been using that same technique since ver 6.0.4. because it has always driven me crazy that I couldn't just hit reply on the emails I received lol.
If you don't want to replace yours then comparing them will work too. I added the senders IP address, changed the body of the email so it isn't one long string of text and swapped out the Dolphin sendmail function with the default php one. BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Does this work in the latest 7.1.3 version of dolphin? The easy way to do it is replace the Dolphin email function in contact.php with the one built into php. Look for this line:
if (sendMail($site['email'], $sLetterSubject, $sLetterBody)) {
and change it to this:
if (mail($site['email'], $sLetterSubject, $sLetterBody, $sSenderEmail)) {
|