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
Change From Name (NOT Email Address)
July 3, 2007
7:18 am
Jason
Guest

Hey,

This is probably the best plugin I've found yet! At first, I was just planning on slapping a quick contact form together and be done with it, but I was absolutely amazed how at comprehensive and configurable this thing is!

My question is how do I change the from NAME, not the email, I've searched and seen how to change the email address, but when I open cforms.php and replace:

.get_option('blogname').

with:

MyDomain.com

I get a major error and crashes the whole site. I know it probably has something to do with the .'s or maybe the quotation marks outside of .get_option('blogname').

So, which part of that line exactly do I replace with MyDomain.com ?

Thank so much in advance, and for an amazing plugin! 

July 3, 2007
7:35 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Jason, please see the FAQs, it's the 4th entry. Also, tinkering with the FROM: address always has the potential to break plugins/WP quickly, that's why I moved away from making this field configurable via the UI (and instead provided the alternative using REPLY-TO).

If you do have to make changes to the FROM: please be aware that your mail sever may not accept (which yo've already experienced) the new format or mail address per se!

Search for "wordpress@" (both $headers & $headers2, 4x in total) and remove this line:

$headers = "From: \\"".get_option('blogname')."\\" <wordpress@" . p [...]

then change the below REPLY-TO line from:

$headers.= "Reply-To: " . [...]

to:

$headers = "From: " . [...]  (NOTE: the missing 'period' before the = !)

This should do the trick. 

July 3, 2007
7:42 am
Jason
Guest

Thanks for the quick reply Oliver.

I don't think this is exactly what I was trying to do though. In fact, what I'm trying to do is simpler I think.

I don't want to change the email address or any of that, because it's working perfectly as is. All I want to change is the "from NAME".

For example, when someone gets a confirmation email from me now, it uses my entire Blog Name as the from name, which makes it look sloppy. Instead of using that .get_option('blogname'). code to call the entire long blog name, I just want to input my own "blogname" as "MyDomain.com"

See what I mean? I'm leaving the actual email address and reply to, etc. the same. 

July 3, 2007
7:48 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Ooop I guess I got 'carried away' after reading 'MyDomain.com' … ;-)

In that case, you've done the right thing, simply replace the middle part:

".get_option('blogname')."  

with:

mydomain.com

So the final result would look like:

$headers = "From: \\"mydomain.com\\" <wordpress@" . [...]

July 3, 2007
8:01 am
Jason
Guest

haha, no problem, after seeing how many people asked the similar question about the from EMAIL, i understand ;)

your fix worked perfectly, i was just leaving in too many of the "s and \\s

thanks so much for the help, and a now PERFECT plugin! 

November 14, 2011
2:50 pm
Stefan
Guest
Hi there,

 

I have (several years later) the same problem, but can't find the files in the currecnt cforms II. I need the form to mimic the user submitted name and e-mail adres to feed entries into a ticket system which categorieses on that information.

 

I've succeeded with the e-mailadres part, but now the from sender name remains. Could somebody point me into the right direction, which file should i edit?

 

Thx in advance, kind regards.

 

Stefan 

November 16, 2011
8:36 am
Stefan
Guest
Little topic bump :)

 

Anybody with some pointers in the right direction concering the above post?

 

November 21, 2011
12:14 pm
Stefan
Guest

nobody? cry

November 29, 2011
7:46 pm
Merras
Guest

clearly need a solution for this.

 

I'm using cforms on a multisite installation and I need to configure sender name separately.

October 14, 2012
4:56 pm
bingorabbit
Guest

Just in case any one was still looking for this, simply in the FROM: field add the email in the following format:

 

Your Name/Desired Name

 

Thanks in Advance!

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
29 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: 3732

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5333

Posts: 18696

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

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

Administrators: Oliver (6400), Nicky (3)