Developer Support »

Script with no From: email address  (See more user questions)

No.

That code is from the autoresponder.

There is a configurable option in later versions of the script, that allows
you to hard-code a From: address. It is the $from_email variable.

I have attached the latest version of the script, should you need it.

Cheers.

Charles Sweeney
http://FormToEmail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Tuesday, June 02, 2009 5:26 PM
Subject: Re: FormToEmail script


> Hello Charles,
>
> Do you mean changing this:
> $headers = "From: " . $my_email;
>
> To this:
> $headers = "From: Family <forms@.com>";
>
> Thanks,
>
>
>
> FormToEmail.com wrote:
>> Hi
>>
>> Maybe your the email server on your host doesn't like sending an email
>> when there is no From: address, as would be the case if there was no
>> email input on your form. Try the option in the script to hard-code a
>> From: address into the script. This means you don't need to use an email
>> input on your form to get the From: address that your server might
>> require.
>>
>> Always worth running it past the host too.
>>
>> Best wishes.
>>
>> Charles Sweeney
>> http://FormToEmail.com
>> The world's easiest feedback script!
>>
>> ----- Original Message -----
>> Sent: Tuesday, June 02, 2009 2:15 AM
>> Subject: Re: FormToEmail script
>>
>>
>>> Hello Charles,
>>>
>>> I am trying to get the following page to work (upload elements only
>>> without any other input being required) and I can't seem to locate the
>>> problem:
>>> http://www..com/Family/pictures.html
>>>
>>> As you suggested, I have tried the following:
>>>
>>> * tried a fresh copy of the script - still gives "no blank form"
>>> error
>>> * tried the "required fields" option - redirects to thank you page
>>> as if it was sent, but no emails ever arrive
>>>
>>> When I add the email field (requiring entry of an email address), it
>>> works perfectly (but, as mentioned, I am trying to create a form that
>>> doesn't require any other input - uploads only). Any suggestions?
>>>
>>> Thanks,
>>>
>>>
>>>
>>> FormToEmail.com wrote:
>>>> Hi
>>>>
>>>> I tested the new code. I have now included it in the script for normal
>>>> release. It worked as it should.
>>>>
>>>> Maybe you need to return to it fresh, otherwise it beats me why it
>>>> won't work.
>>>>
>>>> That said, even without the new code, if you make one (or both) of the
>>>> file inputs "required" fields, then you won't get the "blank form"
>>>> error, as the check for a blank form is only done if required fields is
>>>> not enabled in the script.
>>>>
>>>> Best wishes.
>>>>
>>>> Charles Sweeney
>>>> http://FormToEmail.com
>>>> The world's easiest feedback script!
>>>>
>>>> ----- Original Message -----
>>>> Sent: Saturday, May 30, 2009 8:10 PM
>>>> Subject: Re: FormToEmail script
>>>>
>>>>
>>>>> Hello Charles,
>>>>>
>>>>> First, let me say great turn around time on my request. It shows that
>>>>> you truly enjoy what you do.
>>>>>
>>>>> However, here is how things went. First, I used the code from your
>>>>> e-mail. Didn't work. Then, I uploaded the entire form you attached
>>>>> (changed the "to" email address and nothing else. Still didn't work.
>>>>> Am I forgetting something?
>>>>>
>>>>> Thanks in advance for your time on this..
>>>>>
>>>>>
>>>>> FormToEmail.com wrote:
>>>>>>
>>>>>> I have changed the code in the script to allow files to be sent, even
>>>>>> if there are no other fields present. I have attached the latest
>>>>>> version of the script with the change in it (uses the same version
>>>>>> number 3.5).
>>>>>>
>>>>>> Alternatively, you can edit your existing code. Locate this line:
>>>>>>
>>>>>> recursive_array_check_blank($_REQUEST);
>>>>>>
>>>>>> Below it, paste in this code (and comment):
>>>>>>
>>>>>> // Check for a file input. If present, allow the form to be sent.
>>>>>>
>>>>>> if(count($_FILES))
>>>>>> {
>>>>>>
>>>>>> foreach(array_keys($_FILES) as
>>>>>> $value){if(!empty($_FILES[$value]['name'])){$set = 1;}}
>>>>>>
>>>>>> }
>>>>>>
>>>>>> That's it.
>>>>>>
>>>>>> Any questions, just let me know.
>>>>>>
>>>>>> Best wishes.
>>>>>>
>>>>>> Charles Sweeney
>>>>>> http://FormToEmail.com
>>>>>> The world's easiest feedback script!
>>>>>>
>>>>>> ----- Original Message -----
>>>>>> Sent: Friday, May 29, 2009 8:45 PM
>>>>>> Subject: Re: FormToEmail script
>>>>>>
>>>>>>
>>>>>>> Can this work without receiving a "cannot send a blank page" error?
>>>>>>> http://www..com/Family/pictures.html
>>>>>>>
>>>>>>> I'll stop bugging you soon...I promise.
>>>>>>> FormToEmail.com wrote:
>>>>>>>> Fantastic, !
>>>>>>>>
>>>>>>>> Any questions, just let me know.
>>>>>>>>
>>>>>>>> Best wishes.
>>>>>>>>
>>>>>>>> Charles Sweeney
>>>>>>>> http://FormToEmail.com
>>>>>>>> The world's easiest feedback script!
>>>>>>>>
>>>>>>>> ----- Original Message -----
>>>>>>>> Sent: Friday, May 29, 2009 12:32 AM
>>>>>>>> Subject: Re: FormToEmail script
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hello Charles,
>>>>>>>>>
>>>>>>>>> You know when you look at he computer too long and the simplest
>>>>>>>>> tasks get increasingly complex? This has been one of those times.
>>>>>>>>> In my previous test with a fresh copy of the script, I did not
>>>>>>>>> make any changes like I said...like and idiot, that meant not even
>>>>>>>>> including my email address (thus the error).
>>>>>>>>> Good point here --> "Instead of trying to get it NOT to work, why
>>>>>>>>> don't you try getting it to WORK??!!" -- I met the threshold for
>>>>>>>>> filling out my form to test it, so I admit I got a little lazy.
>>>>>>>>>
>>>>>>>>> Needless to say, everything is now working perfectly! (including
>>>>>>>>> receiving the attachments via email). Since I made several changes
>>>>>>>>> to the script when I first started this process, I caused some
>>>>>>>>> problem that I have yet to figure out. I will now go through and
>>>>>>>>> make changes and test one at a time to see where things went wrong
>>>>>>>>> (i.e., which parameter in the script is causing it to not work),
>>>>>>>>> in order to avoid it in the future.
>>>>>>>>>
>>>>>>>>> Your help and response time have been very much appreciated. Your
>>>>>>>>> general interest in truly helping me figure it out is admirable.
>>>>>>>>> It is a great little script you wrote and I am excited to get to
>>>>>>>>> know and use it more.
>>>>>>>>>
>>>>>>>>> Respectfully,