cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Dynamic "From" email address
May 15, 2007
9:52 pm
Amanda
Guest

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. Smile

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

May 15, 2007
10:24 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

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.

May 15, 2007
11:08 pm
Amanda
Guest

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 

May 28, 2007
12:18 pm
Tino
Guest

"FROM address now being hard-coded"

Hmmm… not good. But do you know where in code I can change it? 

May 28, 2007
2:27 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

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 :-)

June 24, 2007
3:27 am
Edwin
Guest

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. :)

 

June 24, 2007
7:24 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

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 ;-)

 

June 25, 2007
3:12 am
Edwin
Guest

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. :)

 

June 25, 2007
11:03 pm
Edwin
Guest

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!

June 25, 2007
11:46 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

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.

 

 

June 26, 2007
5:28 am
Edwin
Guest

Thanks, that works great!

 

October 11, 2012
6:49 pm
Waseem
Guest

Oliver said
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.

 

Can you please specify the file in which this code is located in latest version of cforms ?
i can't find it in cforms.php

October 11, 2012
9:02 pm
Waseem
Guest

I am trying to change the admin from email address in the email that user received.
currently its
username@servername.com
but i want it to be what is entered in (admin from email address, in the cforms.
i am using version 4.5 of cforms.

Please help me.
i am trying to figure it out from many days but still no luck.sf-frownsf-frownsf-frown

October 11, 2012
9:04 pm
Waseem
Guest

its V 14.5

October 12, 2012
2:57 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

I think this is covered in the FAQs, see "FROM: address"

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
31 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3739

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5339

Posts: 18706

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)