# Function sendMail problem

**URL:** <https://forum.kirupa.com/t/function-sendmail-problem/137850>\
**Category:** Uncategorized\
**Created:** [February 17, 2005, 10:03pm UTC](https://forum.kirupa.com/t/function-sendmail-problem/137850 "2005-02-17T22:03:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zianne](https://avatars.discourse-cdn.com/v4/letter/z/839c29/32.png) [@zianne](https://forum.kirupa.com/u/zianne)\
**Post date:** [February 17, 2005, 10:03pm UTC](https://forum.kirupa.com/t/function-sendmail-problem/137850/1 "2005-02-17T22:03:40Z")

</div>

I created 2 input text for Name and Email called respectively text 01 and text 02, with formData.name and formData.email as variables.

In my action layer, I implemented this:

formData = new LoadVars();  
formData.name = “”;  
formData.email = “”;  
formData.recipient = “[leoprods@yahoo.com](mailto:leoprods@yahoo.com)”;  
formData.redirect = “[http://www.designer-quality.com/ccmc3-thanks.htm](http://www.designer-quality.com/ccmc3-thanks.htm)”;  
replyData = new LoadVars();  
replyData.onLoad = MyOnLoad;

in my function layer, I implemented this:  
function clearData() {  
formData.name = “”;  
text01.text = “”;  
formData.email = “”;  
text02.text = “”;  
}  
function sendMail() {  
formData.sendAndLoad(“[http://www.designer-quality.com/cgi/formmail](http://www.designer-quality.com/cgi/formmail)”, replyData, post);  
}

The clearData function works but the sendMail function does not, and I do not get why ??.

When I push the submit button for the form, it does not go to the redirect page located here :

[http://www.designer-quality.com/ccmc3-thanks.htm](http://www.designer-quality.com/ccmc3-thanks.htm)

and of course I do not get the info in my email

If anybody can SEE my mistake, I am over this for 3 days now and cannot find any answer. Thanks.
