Is it posible to set one of these up?
So when a form is submitted they get an email sent back immediately? And if so, can it be customized so that from a certain selection within a field different emails can be auto-sent?
So when a form is submitted they get an email sent back immediately? And if so, can it be customized so that from a certain selection within a field different emails can be auto-sent?
Sure, use this line of code at the onsubmit box to get an email sent :
now config all values to your needs🙂
<?php
mosMail($from, $fromname, $recipient, $subject, $html_message, true,$ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );
?>
now config all values to your needs🙂
Could you please explain what each value is?
Also, can the email that is sent be one I've customized in html?
Also, can the email that is sent be one I've customized in html?
Hi artistjewel,
Please tell us more about what you want to do. Some things can be done very simply with ChronoForms, others need custom code written.
ChronoForms usually sends one email when a form is completed. You can have that email sent to several people (including the person who completed the form). You can also have it use your custom html using a template. You can use PHP in the template filed to change the email depending on the contents of the form.
If you want to send more than one e-mail then you use the code Max suggested to create a second one. Here's one example of how you might use it:
Bob
Please tell us more about what you want to do. Some things can be done very simply with ChronoForms, others need custom code written.
ChronoForms usually sends one email when a form is completed. You can have that email sent to several people (including the person who completed the form). You can also have it use your custom html using a template. You can use PHP in the template filed to change the email depending on the contents of the form.
If you want to send more than one e-mail then you use the code Max suggested to create a second one. Here's one example of how you might use it:
<?php
$from = $replyto_email ="artistjewel@example.com";
$fromname = $replyto_name = "artistjewel";
$recipient = $_POST['email'];
$subject = "email from artistjewel";
$html_message = "<p>Hi, Here's a message from artistjewel.</p>";
$ccemails = $bccemails = $attachments = "";
mosMail($from, $fromname, $recipient, $subject, $html_message, true, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );
?>
Bob
My form is for clients enquiring about airfares, we have two areas 'Australia' and 'New Zealand' that we wish to have an auto response email sent back to them. We were hoping to use just the one form and if they selected Australia then the Australia auto response email would be sent, same applies with New Zealand.
Sounds like it might be better to setup separate forms for each of these?
Sounds like it might be better to setup separate forms for each of these?
Hi artistjewel,
If there are just two options then you could easily set up an email template using some php:
If there are just two options then you could easily set up an email template using some php:
<?php
if ( $_POST['country'] == "Australia" ) {
. . . send this email . . .
} else {
. . . send this email . . .
}
?>
Bob<br><br>Post edited by: GreyHead, at: 2007/11/03 00:14
And where would I insert the email?
Also, if I had them select which region they are from could I have the form results emailed to a different email for each region?
I want 2 regions going to 1 email address and the rest going to another email address.
Also, if I had them select which region they are from could I have the form results emailed to a different email for each region?
I want 2 regions going to 1 email address and the rest going to another email address.
Hi artistjewel,
You need to put together the two pieces of code in this thread to do what you want. Something like this:
Happy to help you with how to use ChronoForms in your application but if you want specific code written then probably best to post in the Professional Help forum.
Bob
You need to put together the two pieces of code in this thread to do what you want. Something like this:
<?php
if ( $_POST['country'] == "Australia" || "NZ"«») {
$from = $replyto_email ="artistjewel@example.com";
$fromname = $replyto_name = "artistjewel";
$recipient = $_POST['email'];
$subject = "email from artistjewel";
$html_message = "<p>Hi, Here's a message from artistjewel.</p>";
$ccemails = $bccemails = $attachments = "";
} else {
$from = $replyto_email ="artistjewel@example.com";
$fromname = $replyto_name = "artistjewel";
$recipient = $_POST['email'];
$subject = "different email from artistjewel";
$html_message = "<p>Hi, Here's a different message from artistjewel.</p>";
$ccemails = $bccemails = $attachments = "";
}
mosMail($from, $fromname, $recipient, $subject, $html_message, true, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );
?>
Exactly what the code would look like depends on exactly what you want to do.
Happy to help you with how to use ChronoForms in your application but if you want specific code written then probably best to post in the Professional Help forum.
Bob
Thanks for this, but I only receive emails in my admin mailbox. The sender doesn't receive anything. What have I to change so that sender will receive an autoreply.
For example
admin = [email]admin@mysite.com[/email]
sender = [email]name@sender.com[/email]
For example
admin = [email]admin@mysite.com[/email]
sender = [email]name@sender.com[/email]
Hi weeteringh,
If you want to send the 'same' email to the sender than you can add the 'sender' field name in the Special Fields tab.
If you want to sent two different emails this isn't supported by ChronoForms 'out of the box' but you can do it by using a little php to construct your thank-you email in the 'OnSubmit after email' field. You'll find several recent examples in the forums here.
Bob
If you want to send the 'same' email to the sender than you can add the 'sender' field name in the Special Fields tab.
If you want to sent two different emails this isn't supported by ChronoForms 'out of the box' but you can do it by using a little php to construct your thank-you email in the 'OnSubmit after email' field. You'll find several recent examples in the forums here.
Bob
Thanks for your reply
I've had a look (few hours) in all kind of forms but cannot find my solution.
What I want is that sender receives an autoreply with a short message, followed by all data that he/she has subscribed.
I've used your test_form
and put this code in 'after submit':
<?php
$from = $replyto_email ="info@myaccount.com";
$fromname = $replyto_name = "myaccount";
$recipient = $_POST['email'];
$subject = "email from myaccount";
$html_message = "<p>We have receveived your subscription with the following data:</p>";
$name = $_POST['name'];
$email = $_POST['email'];
mosMail($from, $fromname, $recipient, $subject, $html_message, true, $email, $name, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );
?>
This scripts results in an email with ALL subscribed data to de the mailbox of owner ([email]info@myaccount.com[/email])
but.............
sender/subscriber receives an email (yes, this works), but only with the message:
We have receveived your subscription with the following data:</
My question: How should I change the script above sho that sender/subscriber also receives his/her other data (name and email in this case).
Thanks again for your help and advice.
I've had a look (few hours) in all kind of forms but cannot find my solution.
What I want is that sender receives an autoreply with a short message, followed by all data that he/she has subscribed.
I've used your test_form
and put this code in 'after submit':
<?php
$from = $replyto_email ="info@myaccount.com";
$fromname = $replyto_name = "myaccount";
$recipient = $_POST['email'];
$subject = "email from myaccount";
$html_message = "<p>We have receveived your subscription with the following data:</p>";
$name = $_POST['name'];
$email = $_POST['email'];
mosMail($from, $fromname, $recipient, $subject, $html_message, true, $email, $name, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );
?>
This scripts results in an email with ALL subscribed data to de the mailbox of owner ([email]info@myaccount.com[/email])
but.............
sender/subscriber receives an email (yes, this works), but only with the message:
We have receveived your subscription with the following data:</
My question: How should I change the script above sho that sender/subscriber also receives his/her other data (name and email in this case).
Thanks again for your help and advice.
Hi weeteringh,
I understand, we will edit 2 lines of the code so they are like this :
and that will do it!!🙂
Cheers
Max
I understand, we will edit 2 lines of the code so they are like this :
echo "name = ".$_POST['name'];
echo "email = ".$_POST['email'];
and that will do it!!🙂
Cheers
Max
No Sorry. Same (wrong) result.
You are sure that the html_message string is OK?
Weeteringh<br><br>Post edited by: weeteringh, at: 2007/12/28 11:33
You are sure that the html_message string is OK?
Weeteringh<br><br>Post edited by: weeteringh, at: 2007/12/28 11:33
Oooh, sorry, I thought this to go at the template field, it should be like this :
Cheers
Max
$html_message = "<p>We have receveived your subscription with the following data:</p>";
$html_message .= "name = ".$_POST['name'];
$html_message .= "email = ".$_POST['email'];
Cheers
Max
Almost Max!
This is the result now (I've uses 'MAX' as name and [email]max@myaccount.com[/email] as email address)
We have receveived your subscription with the following data:
name = MAXemail = [email]max@myaccount.nl[/email]
Final question: How can I get email = on a new line
(<br /> and /n won't work)
Rgrds
Weeteringh
This is the result now (I've uses 'MAX' as name and [email]max@myaccount.com[/email] as email address)
We have receveived your subscription with the following data:
name = MAXemail = [email]max@myaccount.nl[/email]
Final question: How can I get email = on a new line
(<br /> and /n won't work)
Rgrds
Weeteringh
Dear all,
I've found the solution (in another forum):
$html_message = "<p>We have receveived your subscription with the following data:</p>";
$html_message .= "name = ".$_POST['name'].'<br />';
$html_message .= "email = ".$_POST['email'].'<br />';
So: '<br />' at the end of each value.
Thanks anyway!
Happy Seasons's greetings from Holland,
Weeteringh
Post edited by: weeteringh, at: 2007/12/28 19:26<br><br>Post edited by: weeteringh, at: 2007/12/28 19:27
I've found the solution (in another forum):
$html_message = "<p>We have receveived your subscription with the following data:</p>";
$html_message .= "name = ".$_POST['name'].'<br />';
$html_message .= "email = ".$_POST['email'].'<br />';
So: '<br />' at the end of each value.
Thanks anyway!
Happy Seasons's greetings from Holland,
Weeteringh
Post edited by: weeteringh, at: 2007/12/28 19:26<br><br>Post edited by: weeteringh, at: 2007/12/28 19:27
Hi weetering,
Yes, you can use '<br />' tags like this or put <p> </p> tags around the entries to make separate paragraphs. Just the same as normal html.
Bob
Yes, you can use '<br />' tags like this or put <p> </p> tags around the entries to make separate paragraphs. Just the same as normal html.
Bob
Hi,
At one point I wa able to use the forums to figure out how to get an auto response email to be sent to the $recepient, but for some reason after upgrading from one older version of CF to newer version is stopped working. After spending nearly 20 hours messing with, yes no joke, it's true my wife is ready to kill me and NO successful fix, so see below and hopefully y'all can help.
So, this is the basic code I have in the On Submit code - after sending email:
------------------------------------------------------------------------------------------------------------------------
<?php
$recipient = $_POST['eMail'];
$subject = "CCVC -Season Survey THANK YOU";
$html_message = "<p> ",</p>;
<p>Thank you for completing the Season Survey.</p>
<p></p>
<p>We look forward to seeing you again in the next season. Stay tuned to the website for the latest and most up-to-date information.</p>
<p></p>
<p>Sincerely,</p>
<br>Capital City Volleyball Club</br>
<br>www.myccvc.com</br>
<br>myccvc@yahoo.com</br>
</p>";
mosMail($from, $fromname, $recipient, $subject, $html_message, true );
?>
------------------------------------------------------------------------------------------------------------------------
I get no email send to the $recipent, but with debug ON I got this error:
------------------------------------------------------------------------------------------------------------------------
_POST: Array ( [eMail] => [email]mike_malloy@cree.com[/email] [Comments] => bpllkepkl )
Case 1: Use table layout
E-mail: 'Yes' custom
Email sent
E-mail message
From: CCVC Season Survey [myccvc.website@yahoo.com]
To: [email]mike_malloy@cree.com[/email]
Subject: CCVC Season Survey -RESPONSE SUBMITTED
eMail [email]mike_malloy@cree.com[/email]
Comments bpllkepkl
Submitted by 24.136.241.129
Parse error: parse error, unexpected ',' in /home/content/c/c/v/ccvchosting/html/components/com_chronocontact/chronocontact.php(537) : eval()'d code on line 4
------------------------------------------------------------------------------------------------------------------------
HELP???
Thanks,
Mike
[email]malloy0@msn.com[/email]
At one point I wa able to use the forums to figure out how to get an auto response email to be sent to the $recepient, but for some reason after upgrading from one older version of CF to newer version is stopped working. After spending nearly 20 hours messing with, yes no joke, it's true my wife is ready to kill me and NO successful fix, so see below and hopefully y'all can help.
So, this is the basic code I have in the On Submit code - after sending email:
------------------------------------------------------------------------------------------------------------------------
<?php
$recipient = $_POST['eMail'];
$subject = "CCVC -Season Survey THANK YOU";
$html_message = "<p> ",</p>;
<p>Thank you for completing the Season Survey.</p>
<p></p>
<p>We look forward to seeing you again in the next season. Stay tuned to the website for the latest and most up-to-date information.</p>
<p></p>
<p>Sincerely,</p>
<br>Capital City Volleyball Club</br>
<br>www.myccvc.com</br>
<br>myccvc@yahoo.com</br>
</p>";
mosMail($from, $fromname, $recipient, $subject, $html_message, true );
?>
------------------------------------------------------------------------------------------------------------------------
I get no email send to the $recipent, but with debug ON I got this error:
------------------------------------------------------------------------------------------------------------------------
_POST: Array ( [eMail] => [email]mike_malloy@cree.com[/email] [Comments] => bpllkepkl )
Case 1: Use table layout
E-mail: 'Yes' custom
Email sent
E-mail message
From: CCVC Season Survey [myccvc.website@yahoo.com]
To: [email]mike_malloy@cree.com[/email]
Subject: CCVC Season Survey -RESPONSE SUBMITTED
eMail [email]mike_malloy@cree.com[/email]
Comments bpllkepkl
Submitted by 24.136.241.129
Parse error: parse error, unexpected ',' in /home/content/c/c/v/ccvchosting/html/components/com_chronocontact/chronocontact.php(537) : eval()'d code on line 4
------------------------------------------------------------------------------------------------------------------------
HELP???
Thanks,
Mike
[email]malloy0@msn.com[/email]
This topic is locked and no more replies can be posted.