Forums

Getting Unknown Sender & No Subject on emails

tpascubarat 11 Jun, 2010
Using:
<?php
$request_assistance_f = JRequest::getVar('request_assistance_f', '', 'post');
$hidden_14 = JRequest::getVar('hidden_14', '', 'post');
$subject = $request_assistance_f.''.$hidden_14;
JRequest::setVar('subject', $subject);
?>

<?php
$request_assistance_f = JRequest::getVar('request_assistance_f', '', 'post');
$hidden_15 = JRequest::getVar('hidden_15', '', 'post');
$fromname = $request_assistance_f.''.$hidden_15;
JRequest::setVar('fromname', $fromname);
?>

on On Submit code - before sending email

I have 2 hidden fields on the request_assistance_f form. On the Dynamic Subject line I have subject and on the Dynamic From I have fromname. But on the emails returned to the user, I am getting (unknown sender) and (unknown subject) follow by the Form Heading(on the subject line).

Can someone see what is going wrong. I have very little php knowledge.
GreyHead 11 Jun, 2010
Hi tpascubarat,

The code looks OK. Please turn on Debug in the Form General tab and post the resulting output here so that we can see what else is happening here.

Bob
tpascubarat 11 Jun, 2010
Here is the debug report.

1. Form passed first SPAM check OK
2. Form passed the submissions limit (if enabled) OK
3. Form passed the Image verification (if enabled) OK
4. Form passed the server side validation (if enabled) OK
5. $_POST Array: Array ( [name] => Greg Gomez [email] => [email]emailaddress@gmail.com[/email] [address] => an address [city] => city [state_6] => state [zip] => 75043 [phone] => (214) xxx-xxxx [services_10] => Household Utilities [other] => [subject] => Thank you for your request [fromname] => Life Message, Inc. [comments] => N/A [button_13] => Submit [51d8ffd7fa88a9c545ae472021d6b727] => 1 [1cf1] => 57fc5322a55b1c1b66f23ddeae6410a6 [chronoformname] => request_assistance_f )
6. $_FILES Array: Array ( )
7. Form passed the plugins step (if enabled) OK

GreyHead 11 Jun, 2010
Hi tpascubarat,

That tells me that there are no values being submitted for 'hidden_14', 'hidden_15' or 'request_assistance_f' so the values being generated are correct - just the single space.

Bob
tpascubarat 11 Jun, 2010
OK, but having very limited knowledge of php, I need some extra help.

The form name is request_assistance_f
The 4 dynamic fields are:
Dynamic To: 'email'
Dynamic Subject: 'subject'
Dynamic FromName: 'fromname'
Dynamic FromEmail: 'fromemail'

all without quotes

The Dynamic To is the only thing that is working.
GreyHead 12 Jun, 2010
Hi tpascubarat,

I'm sorry but your code using values from inputs that don't exist makes no sense to me at all.

Please tell me what you are trying to do here?

Bob

PS I strongly recommend that you do *not* use the Dynamic From Email (and probably not the DyNamic From Name); it is likely to get your emails sent to a spam filter. Use the Dynamic Reply To elements instead.
tpascubarat 12 Jun, 2010
I noticed that some of the values were either missing or incorrect. I adjusted them and all works great. Although I do have it set as Dynamic from name and from email, I will replace it with reply.

Now all I have left is configuring a button or a redirect for after the user submits the form.

Thanks for your assistance. I am glad I purchased a subscription.
This topic is locked and no more replies can be posted.