Default contact form works to set From name and address, but Webform e-mails are being sent with name "H-Sphere Httpd Daemon" and e-mail "httpd@web4.phonywebhost.net".

Don't know if this is helpful, but here's debug output:

    * E-mail Headers:

      Array
      (
          [X-Mailer] => Drupal Webform (PHP/5.2.5)
      )

      To: email_name@yahoo.com
      From: "Petra & Colin" <info@domainname.com>
      Subject: Form submission from: [title]
      E-mail Body:

      Submitted on 04/02/2008 - 23:47
      Submitted by user: colin [207.181.225.85]

      Submitted values are:
        Address: email_name@yahoo.com
        Attending: no


      The results of this submission may be viewed at:
      /chicago/rsvp2?sid=15

    * E-mail Headers:

      Array
      (
          [X-Mailer] => Drupal Webform (PHP/5.2.5)
      )

      To: email_name@gmail.com
      From: "Petra & Colin" <info@domainname.com>
      Subject: Form submission from: [title]
      E-mail Body:

      Submitted on 04/02/2008 - 23:47
      Submitted by user: colin [207.181.225.85]

      Submitted values are:
        Address: email_name@yahoo.com
        Attending: no


      The results of this submission may be viewed at:
      /chicago/rsvp2?sid=15

    * $form_state is:

      Array
      (
          [storage] => 
          [submitted] => 1
          [values] => Array
              (
                  [submitted] => Array
                      (
                          [1] => email_name@yahoo.com
                          [2] => no
                      )

                  [details] => Array
                      (
                          [email_subject] => default
                          [email_from_name] => Petra & Colin
                          [email_from_address] => info@domainname.com
                          [nid] => 19
                      )

                  [op] => Submit
                  [submitbutton] => Submit
                  [form_build_id] => form-0a517a4fb8a3bd177b1b1140c53d0ad1
                  [form_token] => 935b11c91123ca6deecd774d7ae59c21
                  [form_id] => webform_client_form_19
                  [submitted_tree] => Array
                      (
                          [address] => email_name@yahoo.com
                          [attending] => no
                      )

              )

          [clicked_button] => Array
              (
                  [#type] => submit
                  [#value] => Submit
                  [#weight] => 1000
                  [#post] => Array
                      (
                          [submitted] => Array
                              (
                                  [address] => email_name@yahoo.com
                                  [attending] => no
                              )

                          [details] => Array
                              (
                                  [email_subject] => default
                                  [email_from_name] => Petra & Colin
                                  [email_from_address] => info@domainname.com
                              )

                          [form_build_id] => form-6d8c6cee6371022223b1f96d96c96c80
                          [form_token] => 935b11c91123ca6deecd774d7ae59c21
                          [form_id] => webform_client_form_19
                          [op] => Submit
                      )

                  [#programmed] => 
                  [#tree] => 
                  [#parents] => Array
                      (
                          [0] => submitbutton
                      )

                  [#array_parents] => Array
                      (
                          [0] => submitbutton
                      )

                  [#processed] => 
                  [#description] => 
                  [#attributes] => Array
                      (
                      )

                  [#required] => 
                  [#input] => 1
                  [#name] => op
                  [#button_type] => submit
                  [#executes_submit_callback] => 1
                  [#process] => Array
                      (
                          [0] => form_expand_ahah
                      )

                  [#id] => edit-submitbutton
              )

          [redirect] => 
      )

    * $_SERVER is:

      Array
      (
          [FCGI_ROLE] => RESPONDER
          [CONTENT_LENGTH] => 1162
          [CONTENT_TYPE] => multipart/form-data; boundary=---------------------------12358665320865
          [DOCUMENT_ROOT] => /hsphere/local/home/petra/domainname.com
          [HTTP________________] => ------------
          [HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
          [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
          [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
          [HTTP_CONNECTION] => keep-alive
          [HTTP_COOKIE] => SESSc13225e752faadd31b6d34b40b1e3153=m5gssd5lqt9dlpbaarrqggsm64; SESS69bbce4208e445682d9ae080db935e83=vurr8iinsvtil7uoq69okeiit6; has_js=1; dhtml_menu=sub50009Administer2,sub49995Siteconfiguration18,sub49975Prague244,sub50000Chicago248; navigationtree=0
          [HTTP_HOST] => www.domainname.com
          [HTTP_KEEP_ALIVE] => 300
          [HTTP_REFERER] => http://www.domainname.com/chicago/rsvp2
          [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
          [PATH] => /hsphere/shared/bin:/hsphere/shared/sbin:/hsphere/local/var/vpopmail/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin
          [REDIRECT_QUERY_STRING] => q=chicago/rsvp2
          [REDIRECT_REDIRECT_STATUS] => 200
          [REDIRECT_STATUS] => 200
          [REDIRECT_URL] => /index.php
          [REMOTE_ADDR] => 207.181.225.85
          [REMOTE_PORT] => 19149
          [SCRIPT_FILENAME] => /hsphere/local/home/petra/domainname.com/index.php
          [SERVER_ADDR] => 216.86.146.13
          [SERVER_ADMIN] => webmaster@domainname.com
          [SERVER_NAME] => domainname.com
          [SERVER_PORT] => 80
          [SERVER_SIGNATURE] => <ADDRESS>Apache/1.3.41 Server at domainname.com Port 80</ADDRESS>

          [SERVER_SOFTWARE] => Apache/1.3.41 (Unix) mod_fastcgi/2.4.2 mod_mono/1.2.4 mod_perl/1.30 PHP/4.4.8 mod_psoft_traffic/0.2 mod_ssl/2.8.31 OpenSSL/0.9.8b FrontPage/5.0.2.2635
          [GATEWAY_INTERFACE] => CGI/1.1
          [SERVER_PROTOCOL] => HTTP/1.1
          [REQUEST_METHOD] => POST
          [QUERY_STRING] => q=chicago/rsvp2
          [REQUEST_URI] => /chicago/rsvp2
          [SCRIPT_NAME] => /index.php
          [ORIG_SCRIPT_FILENAME] => /hsphere/shared/php5/bin/php-cgi
          [ORIG_PATH_INFO] => /index.php
          [ORIG_PATH_TRANSLATED] => /hsphere/local/home/petra/domainname.com/index.php
          [ORIG_SCRIPT_NAME] => /php-fastcgi/php-cgi
          [PHP_SELF] => /index.php
          [REQUEST_TIME] => 1207201652
          [argv] => Array
              (
                  [0] => q=chicago/rsvp2
              )

          [argc] => 1
      )

    * $_POST is:

      Array
      (
          [submitted] => Array
              (
                  [address] => email_name@yahoo.com
                  [attending] => no
              )

          [details] => Array
              (
                  [email_subject] => default
                  [email_from_name] => Petra & Colin
                  [email_from_address] => info@domainname.com
              )

          [form_build_id] => form-6d8c6cee6371022223b1f96d96c96c80
          [form_token] => 935b11c91123ca6deecd774d7ae59c21
          [form_id] => webform_client_form_19
          [op] => Submit
      )

Comments

quicksketch’s picture

This looks like your web host is adding or changing the headers in the emails webform sends out. When other emails are sent out from your Drupal site (like the lost password or account confirmation emails), do they also have these values for the FROM information? It might also be helpful to post the raw headers from the emails you receive. Maybe the FROM is being set but some other header actually shows up in the email client.

selfsimilar’s picture

My thoughts are - maybe webform is not setting all the headers? I've listed two e-mail headers below. The first is from the default Drupal contact form and the received e-mail is formatted correctly. The second is from the email received from the webform and the FROM fields are incorrectly formatted. I did a diff and the Drupal contact form has the following lines that webform doesn't:

lines 13-16:

Delivered-To: DOMAIN.com-colin@DOMAIN.com
X-RCPT-TO: colin@DOMAIN.com
X-Envelope-To: colin@DOMAIN.com
Received: (qmail 32225 invoked by uid 399); 3 Apr 2008 14:45:10 -0000

lines 25-27:

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8Bit

lines 29-31

Errors-To: info@DOMAIN.com
Sender: info@DOMAIN.com
Reply-To: colin@EMAIL.net

one more minor difference is that line 32
From: colin@EMAIL.net
is printed before the Message-Id in the Drupal contact e-mail and after the Message-Id in the webform e-mail.

Raw headers:

Headers from e-mail sent by default Drupal contact form with proper FROM

Delivered-To: USER@gmail.com
Received: by 10.142.177.14 with SMTP id z14cs25110wfe;
        Thu, 3 Apr 2008 07:45:13 -0700 (PDT)
Received: by 10.35.130.7 with SMTP id h7mr18209068pyn.10.1207233910145;
        Thu, 03 Apr 2008 07:45:10 -0700 (PDT)
Return-Path: <httpd@web4.steadfast.net>
Received: from mail.nozonenet.com (mail.nozonenet.com [216.86.146.6])
        by mx.google.com with ESMTP id f79si3568214pyh.25.2008.04.03.07.45.09;
        Thu, 03 Apr 2008 07:45:10 -0700 (PDT)
Received-SPF: neutral (google.com: 216.86.146.6 is neither permitted nor denied by best guess record for domain of httpd@web4.steadfast.net) client-ip=216.86.146.6;
Authentication-Results: mx.google.com; spf=neutral (google.com: 216.86.146.6 is neither permitted nor denied by best guess record for domain of httpd@web4.steadfast.net) smtp.mail=httpd@web4.steadfast.net
Received: (qmail 32227 invoked by uid 399); 3 Apr 2008 14:45:10 -0000
Delivered-To: DOMAIN.com-colin@DOMAIN.com
X-RCPT-TO: colin@DOMAIN.com
X-Envelope-To: colin@DOMAIN.com
Received: (qmail 32225 invoked by uid 399); 3 Apr 2008 14:45:10 -0000
Received: from unknown (HELO web4.steadfast.net) (216.86.146.13)
  by mail.nozonenet.com with ESMTPM; 3 Apr 2008 14:45:10 -0000
X-Originating-IP: 216.86.146.13
Received: by web4.steadfast.net (Postfix, from userid 100)
	id 6A7A87D176; Thu,  3 Apr 2008 09:45:09 -0500 (CDT)
To: colin@DOMAIN.com,petra@DOMAIN.com
Subject: [us] test
X-PHP-Script: DOMAIN.com/index.php for 67.155.61.126
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Errors-To: info@DOMAIN.com
Sender: info@DOMAIN.com
Reply-To: colin@EMAIL.net
From: colin@EMAIL.net
Message-Id: <20080403144509.6A7A87D176@web4.steadfast.net>
Date: Thu,  3 Apr 2008 09:45:09 -0500 (CDT)

colin sent a message using the contact form at  
http://www.DOMAIN.com/contact/us.

test

Headers from e-mail sent by webform with improper FROM

Delivered-To: USER@gmail.com
Received: by 10.142.177.14 with SMTP id z14cs25153wfe;
        Thu, 3 Apr 2008 07:46:03 -0700 (PDT)
Received: by 10.35.87.8 with SMTP id p8mr18135098pyl.51.1207233962814;
        Thu, 03 Apr 2008 07:46:02 -0700 (PDT)
Return-Path: <httpd@web4.steadfast.net>
Received: from mail.nozonenet.com (mail.nozonenet.com [216.86.146.6])
        by mx.google.com with ESMTP id f78si8295561pyh.18.2008.04.03.07.46.02;
        Thu, 03 Apr 2008 07:46:02 -0700 (PDT)
Received-SPF: neutral (google.com: 216.86.146.6 is neither permitted nor denied by best guess record for domain of httpd@web4.steadfast.net) client-ip=216.86.146.6;
Authentication-Results: mx.google.com; spf=neutral (google.com: 216.86.146.6 is neither permitted nor denied by best guess record for domain of httpd@web4.steadfast.net) smtp.mail=httpd@web4.steadfast.net
Received: (qmail 2087 invoked by uid 399); 3 Apr 2008 14:46:03 -0000
Received: from unknown (HELO web4.steadfast.net) (216.86.146.13)
  by mail.nozonenet.com with ESMTPM; 3 Apr 2008 14:46:03 -0000
X-Originating-IP: 216.86.146.13
Received: by web4.steadfast.net (Postfix, from userid 100)
	id 0F3AB7D0A8; Thu,  3 Apr 2008 09:46:02 -0500 (CDT)
To: USER@gmail.com
Subject: Form submission from: [title]
X-PHP-Script: DOMAIN.com/index.php for 67.155.61.126
X-Mailer: Drupal Webform (PHP/5.2.5)
Message-Id: <20080403144602.0F3AB7D0A8@web4.steadfast.net>
Date: Thu,  3 Apr 2008 09:46:02 -0500 (CDT)
From: httpd@web4.steadfast.net (H-Sphere Httpd Daemon)

Submitted on 04/03/2008 - 08:46
Submitted by anonymous user: [67.155.61.126]

Submitted values are:
   Address: colin@EMAIL.net
   Attending: yes


The results of this submission may be viewed at:
/chicago/rsvp2?sid=16
mat101010’s picture

I am getting the identical results that selfsimilar posted above. The FROM name and email address are replaced with
On Thu, Apr 3, 2008 at 11:46 PM, <bordercompany@p3slh140.shr.phx3.secureserver.net>
Has anyone found a quick fix? I can post the raw headers but I didn't see the point as the same issue is going on and selfsimilar did a nice job of cleaning it up. Reply if you think more examples will help. running D6.0

DaveNotik’s picture

+1

selfsimilar’s picture

Status: Active » Fixed

Behavior no longer present under Drupal 6.2 and Webforms 6.x-2.0-beta5.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.