| Post |
|
Guest
| Amanda 9:52 pm May 15, 2007
| |
|
|
Hi… first of all. LOVE this plugin. All the contact form plugins I've used in the past were very restrictive, and only allowed a few pre-determined fields… so Thank You for coding this.
My question is… is there a way to set the "From" email address to be whatever the person filling out the form put for their email addy?
I'd like to be able to hit "reply" and respond to my contact forms that way. Right now, the "From" address is set to "wordpress@mydomain.com."
Maybe someone can walk me through how to change this…
Thanks!
Amanda
|
|
|
Admin
| Oliver Munich, Germany posts 6094 10:24 pm May 15, 2007
| |
|
|
Hi Amanda,
The sole reason for the FROM address now being hard-coded to what usually is being used by WP as a default address (it used to be configurable in the past) is due to paranoid email servers that refused to relay emails if the the user provided a FROM address that would only in the slightest deviate from what they'd accept.
However, cforms sets a REPLY-TO address (provided there is an email field in your form!) to which you can directly respond to.
|
|
|
|
|
Guest
| Amanda 11:08 pm May 15, 2007
| |
|
|
Oh gosh, I'm sorry. I did not even notice the "Reply-To" address because Gmail hides it by default.
I figured this was hard-coded for spam reasons… thanks for clarifying!
Amanda
|
|
|
Guest
| Tino 12:18 pm May 28, 2007
| |
|
|
"FROM address now being hard-coded"
Hmmm… not good. But do you know where in code I can change it?
|
|
|
Admin
| Oliver Munich, Germany posts 6094 2:27 pm May 28, 2007
| |
|
|
Well, it's good for me, because users started configuring all kinds of email addresses that would cause their servers to go crazy and I kept getting emails with "hey cforms doesn't work".
Using a hard coded FROM: and configurable REPLY-TO: is definitely a GOOD thing :-)
|
|
|
|
|
Guest
| Edwin 3:27 am June 24, 2007
| |
|
|
Hi Oliver,
Great plug-in, I'm still working on setting it up but in reading the forums here I'd have to strongly disagree with your statement about hard coded FROM: field. I understand the problems you mentioned but this is really inconvenient for those of us who don't know PHP.
I don't want to have the e-mails come from my host server name because I don't want to share that information with my blog's guests especially since it has my name as part of the string. It would be fine if you added this to the interface and warned people that it depends on their server what e-mail addresses will work. You can even have a recommended address filled in. Hard coding is not the answer. :)
|
|
|
Admin
| Oliver Munich, Germany posts 6094 7:24 am June 24, 2007
| |
|
|
Hi Edwin,
Re: hardcoded FROM:
There is not much too it if you require the FROM: address to be a different one than your WP default one (wordpress@). I've posted it in other replies, but really the only thing you need to do, is to go into cforms.php and search for wordpress@ and replace it in four areas with whatver you'd like it to be. Easy. And for that you don't need to know PHP :-)
I may add it again in the next release (5.1). (PS. …and will reroute all support emails your way ;-)
|
|
|
|
|
Guest
| Edwin 3:12 am June 25, 2007
| |
|
|
Thanks for the response, I got it working by making those replacements. It would be nice to see it in the interface next version because that way others can find an obvious place to do that.
Feel free to route all support questions to my contact form, now that I know how to customize the FROM: field. :)
|
|
|
Guest
| Edwin 11:03 pm June 25, 2007
| |
|
|
Hi Oliver,
I have a related question maybe you can answer. I'm trying to set the From: address to be from the person's e-mail who the user is sending the comment to when there are multiple recipients via drop-down. How would I go about modifying that line to do that?
Thanks!
|
|
|
Admin
| Oliver Munich, Germany posts 6094 11:46 pm June 25, 2007
| |
|
|
If I understand you right, you'd like to set the FROM: address of the emails going out to the visitor (either via auto confirmation or CC'ed) to the address/recipient the visitor had chosen at form submission.
All you need to do (I think) is to make a small modification, removing the current FROM line and making the REPLY-TO become the NEW FROM: – makes sense?
- Search for "$headers2 = "From: …" (2x)
- Comment out this line
- below this line, change
$headers2.= "Reply-To: " to
$headers2 = "From: " (note the missing dot!)
That should do the trick. Again, depending on what recipient addresses you've configured, your mail server may refuse to relay the email (for all it knows, it could be a "spam attempt") …give it a shot.
|
|
|
|
|
Guest
| Edwin 5:28 am June 26, 2007
| |
|
|
Thanks, that works great!
|
|