Forums

Emails not being sent

avantswer 24 Jun, 2007
I have created a form for simple emails and it stores the data in the database however it does not send the email. the email address is styped correctly. Can anyone help?

Cheers

http://batterydoctors.com.au/component/option,com_chronocontact/Itemid,31/chronoformname,ChronoContact_Email/


code below

<table cellpadding="0" cellspacing="5" border="0">
<tr><td width="90">Title:</td><td>
<select name="title">
<option>Mr.</option>
<option>Mrs.</option>
</select>
</td></tr>
<tr><td><b>Name:</b></td><td>
<input type="text" name="name" size="40">
</td></tr>
<tr><td>Age:</td><td>
<input type="text" name="age" size="5">
</td></tr>
<tr><td><b>Email:</b></td><td>
<input type="text" name="email" size="40">
</td></tr>
<tr><td><b>Subject:</b></td><td>
<input type="text" name="subject" size="40">
</td></tr>
<tr><td><b>Message:</b><br>(Max : 1000chrs)</td><td>
<textarea rows="5" cols="40" name="maxcharfield" id="maxcharfield"
onKeyDown="textCounter(this,'progressbar1',1000)"
onKeyUp="textCounter(this,'progressbar1',1000)"
onFocus="textCounter(this,'progressbar1',1000)"></textarea><br />

<div id="progressbar1" class="progress"></div>

<script>textCounter(document.getElementById("maxcharfield"),"progressbar1",1000)</script>
</td></tr>
</table>
<input type="submit" name="Submit" value="Send" onClick="process_general_form()">


********************************************************


function process_general_form() {
var email = document.ChronoContact_ChronoContact_Email.email.value;
var name = document.ChronoContact_ChronoContact_Email.name.value;
var subject = document.ChronoContact_ChronoContact_Email.subject.value;
var message = document.ChronoContact_ChronoContact_Email.maxcharfield.value;
if ((email == ""))
{
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.email.focus();
} else if ((name == "")){
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.name.focus();
} else if ((subject == "")){
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.subject.focus();
} else if ((message == "")){
alert("Incomplete Form Details\n\nPlease note that some of the fields are mandatory.");
document.ChronoContact_ChronoContact_Email.maxcharfield.focus();
} else {
document.ChronoContact_ChronoContact_Email.submit();
}
}

batterydoc
GreyHead 24 Jun, 2007
Hi avanswer,

You have called the e-mail field 'email' but in the Form Manager tab you have 'emailfield'. Try changing that over and see if you get the e-mails then.

Bob

PS I'm not completely sure how ChronoForms behaves when you have entries in both 'Email Adress(es)' and 'Email fields'
Max_admin 24 Jun, 2007
Hi,

Errors :

#1 - Email field contains "emailfield" which isn't an existing field name!!
#2 - From email field contains "name" which is supposed to post a "name" and not a "valid email", this is another problem!!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
avantswer 25 Jun, 2007
Thanks alot for this. Ill give it a go and let you know if there are any problems.

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