Forums

multiple recipients not working

flyapen 13 Mar, 2008
Hey,

I followed the guides on this forum en on the site of deafbiz but I can't get it to work.
This is my html code

<p>
  <label>Uw naam : <br>
  <input type="text" name="naam" id="naam" class="align">
  </label>
  <br>
  <label>Nummerplaat :
      <br>
    <input type="text" name="nummerplaat" id="nummerplaat" class="align">
    </label>
  <br>
  <label>E-mail :<br>
    <input type="text" name="email" id="email" class="align">
    </label>
  <br>
  <label>Telefoonnr :
    <br>
    <input type="text" name="tel" id="tel" class="align">
    </label>
 </p>
 <p>
 Locatie : <br>
    <select name="locatie[]" id="locatie" class="align">
  		    <option value="em1">Aalst - Afspraak</option>
                    <option value="em2">Aalst - Vraag</option>
                    <option value="em3">Aalst - Klacht</option>
                    <option value="em4">Londerzeel</option>
                    <option value="em5">Ninove</option>
                    <option value="em6">Welle</option>
                    <option value="em7">Wambeek</option>
                    <option value="em8">Kobbegem</option>
    </select>	
            
    <br>
    Reden :<br> 
    <select name="reden" id="reden" class="align">
  				<option>Afspraak</option>
                <option>Vraag</option>
                <option>Klacht</option>
    </select>
  </p>
  <p>
    <label>
    <textarea name="tekst" id="tekst" cols="45" rows="5"></textarea>
    </label>
  </p>
  <p>
    <label>
    <input type="submit" name="verzend" id="verzend" value="Verzend">
    </label>
  </p>


And my on submit code :

<?php 
$emails = array(
'em1' => 'bert.***ckeni@dealer.renault.be,wesl***ckeni@dealer.renault.be', 
'em2' => 'na***ckeni@dealer.renault.be', 
'em3' => 'il****eni@dealer.renault.be,vero***eni@dealer.renault.be', 
'em4' => 'jo***el@dealer.renault.be', 
'em5' => 'pa**ve@dealer.renault.be', 
'em6' => 'jo.v****i@dealer.renault.be', 
'em7' => 'dr***el@dealer.renault.be', 
'em8' => 'rud****gem@dealer.renault.be');
$rows[0]->extraemail .= ", ".$emails[$_POST[locatie]];

?>


And with debug on I get the following message :

_POST: Array ( [naam] => kristof [nummerplaat] => FGT456 [email] => kke***@gmail.com [tel] => 0456**32 [locatie] => em2 [reden] => Vraag [tekst] => Dit is een testmail. Deze mag meteen gewist worden. [verzend] => Verzend )
Case 1: Use table layout
E-mail: 'Yes' custom
Email not sent



I dont see what i'm doing wrong, If someone has an idea
I would be very gratefull.

Edited to break up long line.

Post edited by: GreyHead, at: 2008/03/17 18:31<br><br>Post edited by: GreyHead, at: 2008/03/17 18:32
Max_admin 13 Mar, 2008
Hi,

Change the field name to : locatie instaed of locatie[]

also you should have the code at the onsubmit BEFORE email!!

Let us know

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
flyapen 13 Mar, 2008
Hi, thanks for the quick response.
I changed the locatie[] to locatie and
the code was allready in the before mail section.
However since this change nothing happened.

This is the full debug output :

_POST: Array (
[naam] => kristof keppens
[nummerplaat] => FGT456
[email] => [email]kkeppens@gmail.com[/email]
[tel] => 04563424332
[locatie] => em2
[reden] => Vraag
[tekst] => test test Dit is een testmail die verwijdert mag worden.
[verzend] => Verzend )
Case 1: Use table layout
E-mail: 'Yes' custom
Email not sent
E-mail message

From: kristof keppens [kkeppens@gmail.com]
To: [email]info@groupvalckenier.be[/email], kk**@gmail.com, nath**er.valckeni@dealer.renault.be,
Subject: Vraag
naam kristof keppens
nummerplaat FGT456
email kk**@gmail.com
tel 04563424332
locatie em2
reden Vraag
tekst test test Dit is een testmail die verwijdert mag worden.


Submitted by 194.78.253.134



I'm confused why the mail doesn't send.
Any help would be much appreciated.

Edited to break up long line.
Thanks in advance and still a great joomla component😉<br><br>Post edited by: GreyHead, at: 2008/03/17 18:29
GreyHead 14 Mar, 2008
Hi flyapen,

It looks as though ChronoForms is passing the email to Joomla OK but it's failing after that. Please check the email FAQ here for some possible causes.

Bob
flyapen 17 Mar, 2008
Hi, I had a second look at my configuration for the form and changed some things without success. My full debug output is now :

_POST: Array (
[naam] => Keppens
[nummerplaat] => FGT456
[email] => kk**p**.com
[tel] => 04563424332
[locatie] => em2
[reden] => Vraag
[tekst] => test test test test Dit is een testmail
[verzend] => Verzend )
Case 1: Use table layout
E-mail: 'Yes' custom
Email not sent
E-mail message

From: Keppens [kke**l.com]
To: kk***ns@gmail.com, nath**ni@dealer.renault.be, em2
Subject: Vraag
naam Keppens
nummerplaat FGT456
email kk**il.com
tel 04563424332
locatie em2
reden Vraag
tekst test test test test Dit is een testmail


Submitted by 194.78.**



Now i get the em2 fieldname with my emaillist, could this be the problem? In my special fields I have the email field name to locatie that refers to the emails.

Edited to break up long line.<br><br>Post edited by: GreyHead, at: 2008/03/17 18:27
GreyHead 17 Mar, 2008
Hi flyapen,

Yes that 'em2' needs to be a valid email address.

I'm confused about what the form code now is. Please take a Form Backup from the Form Manager and post it here or email it to the address in my sig.

Bob
flyapen 18 Mar, 2008
Hi,

I'm glad to announce that it finally works.
The problem seemed to be that I entered locatie in
the mail to field in the special fields tab.
When I leave that field blank it works and sends out the mail to
the recipients in the dropdown list.

The solution looks a little strange to me as I thought that the
mail to field needed to be filled in to send to the correct email adress.
GreyHead 18 Mar, 2008
Hi flyapen,

It does, but I think you are adding the MailTo address when the form is submitted. As long as it is there before the email is sent all will be well.

bob
This topic is locked and no more replies can be posted.